[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f g : C(X, R)
hf : f ∈ {f | ∀ (x : X), x ∈ sᶜ → ↑f x = 0}
hg : g ∈ {f | ∀ (x : X), x ∈ sᶜ → ↑f x = 0}
x : X
hx : x ∈ sᶜ
⊢ ↑(f + g) x = 0
[PROOFSTEP]
simp [hf x hx, hg x hx, coe_add, Pi.add_apply, add_zero]
[GOAL]
X : Type u_1
R : Type u_2
inst✝⁴ : TopologicalSpace X
inst✝³ : Semiring R
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSemiring R
inst✝ : T2Space R
s : Set X
⊢ IsClosed ↑(idealOfSet R s)
[PROOFSTEP]
simp only [idealOfSet, Submodule.coe_set_mk, Set.setOf_forall]
[GOAL]
X : Type u_1
R : Type u_2
inst✝⁴ : TopologicalSpace X
inst✝³ : Semiring R
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSemiring R
inst✝ : T2Space R
s : Set X
⊢ IsClosed
    ↑{
        toAddSubsemigroup :=
          { carrier := ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0},
            add_mem' :=
              (_ :
                ∀ {a b : C(X, R)},
                  a ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →
                    b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} → a + b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0}) },
        zero_mem' :=
          (_ :
            0 ∈
              { carrier := ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0},
                  add_mem' :=
                    (_ :
                      ∀ {a b : C(X, R)},
                        a ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →
                          b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0} →
                            a + b ∈ ⋂ (i : X) (_ : i ∈ sᶜ), {x | ↑x i = 0}) }.carrier) }
[PROOFSTEP]
exact isClosed_iInter fun x => isClosed_iInter fun _ => isClosed_eq (continuous_eval_const x) continuous_const
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ f ∈ idealOfSet R s ↔ ∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0
[PROOFSTEP]
convert Iff.rfl
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ ¬f ∈ idealOfSet R s ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0
[PROOFSTEP]
simp_rw [mem_idealOfSet]
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (¬∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0
[PROOFSTEP]
push_neg
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (Exists fun ⦃x⦄ => x ∈ sᶜ ∧ ↑f x ≠ 0) ↔ ∃ x, x ∈ sᶜ ∧ ↑f x ≠ 0
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
x : X
⊢ ¬x ∈ setOfIdeal I ↔ ∀ ⦃f : C(X, R)⦄, f ∈ I → ↑f x = 0
[PROOFSTEP]
rw [← Set.mem_compl_iff, setOfIdeal, compl_compl, Set.mem_setOf]
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
x : X
⊢ x ∈ setOfIdeal I ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0
[PROOFSTEP]
simp_rw [setOfIdeal, Set.mem_compl_iff, Set.mem_setOf]
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
x : X
⊢ (¬∀ (f : C(X, R)), f ∈ I → ↑f x = 0) ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0
[PROOFSTEP]
push_neg
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
x : X
⊢ (∃ f, f ∈ I ∧ ↑f x ≠ 0) ↔ ∃ f, f ∈ I ∧ ↑f x ≠ 0
[PROOFSTEP]
rfl
[GOAL]
X : Type u_1
R : Type u_2
inst✝⁴ : TopologicalSpace X
inst✝³ : Semiring R
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSemiring R
inst✝ : T2Space R
I : Ideal C(X, R)
⊢ IsOpen (setOfIdeal I)
[PROOFSTEP]
simp only [setOfIdeal, Set.setOf_forall, isOpen_compl_iff]
[GOAL]
X : Type u_1
R : Type u_2
inst✝⁴ : TopologicalSpace X
inst✝³ : Semiring R
inst✝² : TopologicalSpace R
inst✝¹ : TopologicalSemiring R
inst✝ : T2Space R
I : Ideal C(X, R)
⊢ IsClosed (⋂ (i : C(X, R)) (_ : i ∈ I), {x | ↑i x = 0})
[PROOFSTEP]
exact isClosed_iInter fun f => isClosed_iInter fun _ => isClosed_eq (map_continuous f) continuous_const
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
f : C(X, R)
⊢ f ∈ idealOfSet R ∅ ↔ f ∈ ⊥
[PROOFSTEP]
simp only [mem_idealOfSet, Set.compl_empty, Set.mem_univ, forall_true_left, Ideal.mem_bot, FunLike.ext_iff, zero_apply]
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
x : X
f : C(X, R)
⊢ f ∈ idealOfSet R {x}ᶜ ↔ ↑f x = 0
[PROOFSTEP]
simp only [mem_idealOfSet, compl_compl, Set.mem_singleton_iff, forall_eq]
[GOAL]
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
⊢ GaloisConnection setOfIdeal (idealOfSet R)
[PROOFSTEP]
refine' fun I s => ⟨fun h f hf => _, fun h x hx => _⟩
[GOAL]
case refine'_1
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : setOfIdeal I ≤ s
f : C(X, R)
hf : f ∈ I
⊢ f ∈ idealOfSet R s
[PROOFSTEP]
by_contra h'
[GOAL]
case refine'_1
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : setOfIdeal I ≤ s
f : C(X, R)
hf : f ∈ I
h' : ¬f ∈ idealOfSet R s
⊢ False
[PROOFSTEP]
rcases not_mem_idealOfSet.mp h' with ⟨x, hx, hfx⟩
[GOAL]
case refine'_1.intro.intro
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : setOfIdeal I ≤ s
f : C(X, R)
hf : f ∈ I
h' : ¬f ∈ idealOfSet R s
x : X
hx : x ∈ sᶜ
hfx : ↑f x ≠ 0
⊢ False
[PROOFSTEP]
exact hfx (not_mem_setOfIdeal.mp (mt (@h x) hx) hf)
[GOAL]
case refine'_2
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : I ≤ idealOfSet R s
x : X
hx : x ∈ setOfIdeal I
⊢ x ∈ s
[PROOFSTEP]
obtain ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx
[GOAL]
case refine'_2.intro.intro
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : I ≤ idealOfSet R s
x : X
hx : x ∈ setOfIdeal I
f : C(X, R)
hf : f ∈ I
hfx : ↑f x ≠ 0
⊢ x ∈ s
[PROOFSTEP]
by_contra hx'
[GOAL]
case refine'_2.intro.intro
X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
I : Ideal C(X, R)
s : Set X
h : I ≤ idealOfSet R s
x : X
hx : x ∈ setOfIdeal I
f : C(X, R)
hf : f ∈ I
hfx : ↑f x ≠ 0
hx' : ¬x ∈ s
⊢ False
[PROOFSTEP]
exact not_mem_idealOfSet.mpr ⟨x, hx', hfx⟩ (h hf)
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝¹ : IsROrC 𝕜
inst✝ : TopologicalSpace X
f : C(X, ℝ≥0)
c : ℝ≥0
hc : 0 < c
x : X
hx : x ∈ {x | c ≤ ↑f x}
⊢ ↑(mk (↑f ⊔ ↑(const X c))⁻¹ * f) x = OfNat.ofNat 1 x
[PROOFSTEP]
simpa only [coe_const, ge_iff_le, mul_apply, coe_mk, Pi.inv_apply, Pi.sup_apply, Function.const_apply,
  sup_eq_left.mpr (Set.mem_setOf.mp hx), ne_eq, Pi.one_apply] using inv_mul_cancel (hc.trans_le hx).ne'
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
⊢ idealOfSet 𝕜 (setOfIdeal I) = Ideal.closure I
[PROOFSTEP]
refine'
  le_antisymm _
    ((idealOfSet_closed 𝕜 <| setOfIdeal I).closure_subset_iff.mpr fun f hf x hx => not_mem_setOfIdeal.mp hx hf)
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
⊢ idealOfSet 𝕜 (setOfIdeal I) ≤ Ideal.closure I
[PROOFSTEP]
refine' (fun f hf => Metric.mem_closure_iff.mpr fun ε hε => _)
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ
hε : ε > 0
⊢ ∃ b, b ∈ ↑I ∧ dist f b < ε
[PROOFSTEP]
lift ε to ℝ≥0 using hε.lt.le
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : ↑ε > 0
⊢ ∃ b, b ∈ ↑I ∧ dist f b < ↑ε
[PROOFSTEP]
replace hε := show (0 : ℝ≥0) < ε from hε
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
⊢ ∃ b, b ∈ ↑I ∧ dist f b < ↑ε
[PROOFSTEP]
simp_rw [dist_nndist]
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
⊢ ∃ b, b ∈ ↑I ∧ ↑(nndist f b) < ↑ε
[PROOFSTEP]
norm_cast
  -- Let `t := {x : X | ε / 2 ≤ ‖f x‖₊}}` which is closed and disjoint from `set_of_ideal I`.
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
set t := {x : X | ε / 2 ≤ ‖f x‖₊}
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
have ht : IsClosed t := isClosed_le continuous_const (map_continuous f).nnnorm
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
have htI : Disjoint t (setOfIdeal I)ᶜ :=
  by
  refine' Set.subset_compl_iff_disjoint_left.mp fun x hx => _
  simpa only [Set.mem_setOf, Set.mem_compl_iff, not_le] using
    (nnnorm_eq_zero.mpr (mem_idealOfSet.mp hf hx)).trans_lt
      (half_pos hε)
        /- It suffices to produce `g : C(X, ℝ≥0)` which takes values in `[0,1]` and is constantly `1` on
            `t` such that when composed with the natural embedding of `ℝ≥0` into `𝕜` lies in the ideal `I`.
            Indeed, then `‖f - f * ↑g‖ ≤ ‖f * (1 - ↑g)‖ ≤ ⨆ ‖f * (1 - ↑g) x‖`. When `x ∉ t`, `‖f x‖ < ε / 2`
            and `‖(1 - ↑g) x‖ ≤ 1`, and when `x ∈ t`, `(1 - ↑g) x = 0`, and clearly `f * ↑g ∈ I`. -/
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
⊢ Disjoint t (setOfIdeal I)ᶜ
[PROOFSTEP]
refine' Set.subset_compl_iff_disjoint_left.mp fun x hx => _
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
x : X
hx : x ∈ (setOfIdeal I)ᶜ
⊢ x ∈ tᶜ
[PROOFSTEP]
simpa only [Set.mem_setOf, Set.mem_compl_iff, not_le] using
  (nnnorm_eq_zero.mpr (mem_idealOfSet.mp hf hx)).trans_lt
    (half_pos hε)
      /- It suffices to produce `g : C(X, ℝ≥0)` which takes values in `[0,1]` and is constantly `1` on
          `t` such that when composed with the natural embedding of `ℝ≥0` into `𝕜` lies in the ideal `I`.
          Indeed, then `‖f - f * ↑g‖ ≤ ‖f * (1 - ↑g)‖ ≤ ⨆ ‖f * (1 - ↑g) x‖`. When `x ∉ t`, `‖f x‖ < ε / 2`
          and `‖(1 - ↑g) x‖ ≤ 1`, and when `x ∈ t`, `(1 - ↑g) x = 0`, and clearly `f * ↑g ∈ I`. -/
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
suffices ∃ g : C(X, ℝ≥0), (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g ∈ I ∧ (∀ x, g x ≤ 1) ∧ t.EqOn g 1
  by
  obtain ⟨g, hgI, hg, hgt⟩ := this
  refine' ⟨f * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g, I.mul_mem_left f hgI, _⟩
  rw [nndist_eq_nnnorm]
  refine' (nnnorm_lt_iff _ hε).2 fun x => _
  simp only [coe_sub, coe_mul, Pi.sub_apply, Pi.mul_apply]
  by_cases hx : x ∈ t
  ·
    simpa only [hgt hx, comp_apply, Pi.one_apply, ContinuousMap.coe_coe, algebraMapClm_apply, map_one, mul_one,
      sub_self, nnnorm_zero] using hε
  · refine' lt_of_le_of_lt _ (half_lt_self hε)
    have :=
      calc
        ‖((1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x : 𝕜)‖₊ = ‖1 - algebraMap ℝ≥0 𝕜 (g x)‖₊ := by
          simp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,
            algebraMapClm_apply]
        _ = ‖algebraMap ℝ≥0 𝕜 (1 - g x)‖₊ := by
          simp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one,
            sub_smul, one_smul]
        _ ≤ 1 := (nnnorm_algebraMap_nNReal 𝕜 (1 - g x)).trans_le tsub_le_self
    calc
      ‖f x - f x * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g x‖₊ =
          ‖f x * (1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=
        by simp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]
      _ ≤ ε / 2 * ‖(1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=
        ((nnnorm_mul_le _ _).trans (mul_le_mul_right' (not_le.mp <| show ¬ε / 2 ≤ ‖f x‖₊ from hx).le _))
      _ ≤ ε / 2 := by
        simpa only [mul_one] using
          mul_le_mul_left' this
            _
              /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition
                  `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of
                  `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then
                  `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a
                  neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of
                  this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
this : ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
obtain ⟨g, hgI, hg, hgt⟩ := this
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
⊢ ∃ b, b ∈ ↑I ∧ nndist f b < ε
[PROOFSTEP]
refine' ⟨f * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g, I.mul_mem_left f hgI, _⟩
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
⊢ nndist f (f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g) < ε
[PROOFSTEP]
rw [nndist_eq_nnnorm]
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
⊢ ‖f - f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g‖₊ < ε
[PROOFSTEP]
refine' (nnnorm_lt_iff _ hε).2 fun x => _
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
⊢ ‖↑(f - f * comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε
[PROOFSTEP]
simp only [coe_sub, coe_mul, Pi.sub_apply, Pi.mul_apply]
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε
[PROOFSTEP]
by_cases hx : x ∈ t
[GOAL]
case pos
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : x ∈ t
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε
[PROOFSTEP]
simpa only [hgt hx, comp_apply, Pi.one_apply, ContinuousMap.coe_coe, algebraMapClm_apply, map_one, mul_one, sub_self,
  nnnorm_zero] using hε
[GOAL]
case neg
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ < ε
[PROOFSTEP]
refine' lt_of_le_of_lt _ (half_lt_self hε)
[GOAL]
case neg
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2
[PROOFSTEP]
have :=
  calc
    ‖((1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x : 𝕜)‖₊ = ‖1 - algebraMap ℝ≥0 𝕜 (g x)‖₊ := by
      simp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,
        algebraMapClm_apply]
    _ = ‖algebraMap ℝ≥0 𝕜 (1 - g x)‖₊ := by
      simp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one,
        sub_smul, one_smul]
    _ ≤ 1 := (nnnorm_algebraMap_nNReal 𝕜 (1 - g x)).trans_le tsub_le_self
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
⊢ ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ = ‖1 - ↑(algebraMap ℝ≥0 𝕜) (↑g x)‖₊
[PROOFSTEP]
simp only [coe_sub, coe_one, coe_comp, ContinuousMap.coe_coe, Pi.sub_apply, Pi.one_apply, Function.comp_apply,
  algebraMapClm_apply]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
⊢ ‖1 - ↑(algebraMap ℝ≥0 𝕜) (↑g x)‖₊ = ‖↑(algebraMap ℝ≥0 𝕜) (1 - ↑g x)‖₊
[PROOFSTEP]
simp only [Algebra.algebraMap_eq_smul_one, NNReal.smul_def, ge_iff_le, NNReal.coe_sub (hg x), NNReal.coe_one, sub_smul,
  one_smul]
[GOAL]
case neg
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
this : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2
[PROOFSTEP]
calc
  ‖f x - f x * (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g x‖₊ =
      ‖f x * (1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=
    by simp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]
  _ ≤ ε / 2 * ‖(1 - (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) x‖₊ :=
    ((nnnorm_mul_le _ _).trans (mul_le_mul_right' (not_le.mp <| show ¬ε / 2 ≤ ‖f x‖₊ from hx).le _))
  _ ≤ ε / 2 := by
    simpa only [mul_one] using
      mul_le_mul_left' this
        _
          /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition
              `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of
              `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then
              `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a
              neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of
              this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
this : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1
⊢ ‖↑f x - ↑f x * ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ = ‖↑f x * ↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊
[PROOFSTEP]
simp only [mul_sub, coe_sub, coe_one, Pi.sub_apply, Pi.one_apply, mul_one]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g : C(X, ℝ≥0)
hgI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hg : ∀ (x : X), ↑g x ≤ 1
hgt : Set.EqOn (↑g) 1 t
x : X
hx : ¬x ∈ t
this : ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ 1
⊢ ε / 2 * ‖↑(1 - comp (↑(algebraMapClm ℝ≥0 𝕜)) g) x‖₊ ≤ ε / 2
[PROOFSTEP]
simpa only [mul_one] using
  mul_le_mul_left' this
    _
      /- There is some `g' : C(X, ℝ≥0)` which is strictly positive on `t` such that the composition
          `↑g` with the natural embedding of `ℝ≥0` into `𝕜` lies in `I`. This follows from compactness of
          `t` and that we can do it in any neighborhood of a point `x ∈ t`. Indeed, since `x ∈ t`, then
          `fₓ x ≠ 0` for some `fₓ ∈ I` and so `fun y ↦ ‖(star fₓ * fₓ) y‖₊` is strictly posiive in a
          neighborhood of `y`. Moreover, `(‖(star fₓ * fₓ) y‖₊ : 𝕜) = (star fₓ * fₓ) y`, so composition of
          this map with the natural embedding is just `star fₓ * fₓ ∈ I`. -/
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
[PROOFSTEP]
have : ∃ g' : C(X, ℝ≥0), (algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g' ∈ I ∧ ∀ x ∈ t, 0 < g' x :=
  by
  refine' ht.isCompact.induction_on _ _ _ _
  · refine' ⟨0, _, fun x hx => False.elim hx⟩
    convert I.zero_mem
    ext
    simp only [comp_apply, zero_apply, ContinuousMap.coe_coe, map_zero]
  · rintro s₁ s₂ hs ⟨g, hI, hgt⟩; exact ⟨g, hI, fun x hx => hgt x (hs hx)⟩
  · rintro s₁ s₂ ⟨g₁, hI₁, hgt₁⟩ ⟨g₂, hI₂, hgt₂⟩
    refine' ⟨g₁ + g₂, _, fun x hx => _⟩
    · convert I.add_mem hI₁ hI₂
      ext y
      simp only [coe_add, Pi.add_apply, map_add, coe_comp, Function.comp_apply, ContinuousMap.coe_coe]
    · rcases hx with (hx | hx)
      simpa only [zero_add] using add_lt_add_of_lt_of_le (hgt₁ x hx) zero_le'
      simpa only [zero_add] using add_lt_add_of_le_of_lt zero_le' (hgt₂ x hx)
  · intro x hx
    replace hx := htI.subset_compl_right hx
    rw [compl_compl, mem_setOfIdeal] at hx
    obtain ⟨g, hI, hgx⟩ := hx
    have := (map_continuous g).continuousAt.eventually_ne hgx
    refine'
      ⟨{y : X | g y ≠ 0} ∩ t, mem_nhdsWithin_iff_exists_mem_nhds_inter.mpr ⟨_, this, Set.Subset.rfl⟩,
        ⟨⟨fun x => ‖g x‖₊ ^ 2, (map_continuous g).nnnorm.pow 2⟩, _, fun x hx => pow_pos (norm_pos_iff.mpr hx.1) 2⟩⟩
    convert I.mul_mem_left (star g) hI
    ext
    simp only [comp_apply, ContinuousMap.coe_coe, coe_mk, algebraMapClm_toFun, map_pow, mul_apply, star_apply, star_def]
    simp only [normSq_eq_def', IsROrC.conj_mul, ofReal_pow]
    rfl
      /- Get the function `g'` which is guaranteed to exist above. By the extreme value theorem and
          compactness of `t`, there is some `0 < c` such that `c ≤ g' x` for all `x ∈ t`. Then by
          `exists_mul_le_one_eqOn_ge` there is some `g` for which `g * g'` is the desired function. -/
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x
[PROOFSTEP]
refine' ht.isCompact.induction_on _ _ _ _
[GOAL]
case refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ ∅ → 0 < ↑g' x
[PROOFSTEP]
refine' ⟨0, _, fun x hx => False.elim hx⟩
[GOAL]
case refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) 0 ∈ I
[PROOFSTEP]
convert I.zero_mem
[GOAL]
case h.e'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) 0 = 0
[PROOFSTEP]
ext
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
a✝ : X
⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) 0) a✝ = ↑0 a✝
[PROOFSTEP]
simp only [comp_apply, zero_apply, ContinuousMap.coe_coe, map_zero]
[GOAL]
case refine'_2
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∀ ⦃s t : Set X⦄,
    s ⊆ t →
      (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x) →
        ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s → 0 < ↑g' x
[PROOFSTEP]
rintro s₁ s₂ hs ⟨g, hI, hgt⟩
[GOAL]
case refine'_2.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
hs : s₁ ⊆ s₂
g : C(X, ℝ≥0)
hI : comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I
hgt : ∀ (x : X), x ∈ s₂ → 0 < ↑g x
⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s₁ → 0 < ↑g' x
[PROOFSTEP]
exact ⟨g, hI, fun x hx => hgt x (hs hx)⟩
[GOAL]
case refine'_3
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∀ ⦃s t : Set X⦄,
    (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s → 0 < ↑g' x) →
      (∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x) →
        ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s ∪ t → 0 < ↑g' x
[PROOFSTEP]
rintro s₁ s₂ ⟨g₁, hI₁, hgt₁⟩ ⟨g₂, hI₂, hgt₂⟩
[GOAL]
case refine'_3.intro.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
⊢ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ s₁ ∪ s₂ → 0 < ↑g' x
[PROOFSTEP]
refine' ⟨g₁ + g₂, _, fun x hx => _⟩
[GOAL]
case refine'_3.intro.intro.intro.intro.refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂) ∈ I
[PROOFSTEP]
convert I.add_mem hI₁ hI₂
[GOAL]
case h.e'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂) = comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ + comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂
[PROOFSTEP]
ext y
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
y : X
⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (g₁ + g₂)) y =
    ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ + comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂) y
[PROOFSTEP]
simp only [coe_add, Pi.add_apply, map_add, coe_comp, Function.comp_apply, ContinuousMap.coe_coe]
[GOAL]
case refine'_3.intro.intro.intro.intro.refine'_2
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
x : X
hx : x ∈ s₁ ∪ s₂
⊢ 0 < ↑(g₁ + g₂) x
[PROOFSTEP]
rcases hx with (hx | hx)
[GOAL]
case refine'_3.intro.intro.intro.intro.refine'_2.inl
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
x : X
hx : x ∈ s₁
⊢ 0 < ↑(g₁ + g₂) x
case refine'_3.intro.intro.intro.intro.refine'_2.inr
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
x : X
hx : x ∈ s₂
⊢ 0 < ↑(g₁ + g₂) x
[PROOFSTEP]
simpa only [zero_add] using add_lt_add_of_lt_of_le (hgt₁ x hx) zero_le'
[GOAL]
case refine'_3.intro.intro.intro.intro.refine'_2.inr
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
s₁ s₂ : Set X
g₁ : C(X, ℝ≥0)
hI₁ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₁ ∈ I
hgt₁ : ∀ (x : X), x ∈ s₁ → 0 < ↑g₁ x
g₂ : C(X, ℝ≥0)
hI₂ : comp (↑(algebraMapClm ℝ≥0 𝕜)) g₂ ∈ I
hgt₂ : ∀ (x : X), x ∈ s₂ → 0 < ↑g₂ x
x : X
hx : x ∈ s₂
⊢ 0 < ↑(g₁ + g₂) x
[PROOFSTEP]
simpa only [zero_add] using add_lt_add_of_le_of_lt zero_le' (hgt₂ x hx)
[GOAL]
case refine'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
⊢ ∀ (x : X),
    x ∈ t → ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
intro x hx
[GOAL]
case refine'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
hx : x ∈ t
⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
replace hx := htI.subset_compl_right hx
[GOAL]
case refine'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
hx : x ∈ (setOfIdeal I)ᶜᶜ
⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
rw [compl_compl, mem_setOfIdeal] at hx
[GOAL]
case refine'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
hx : ∃ f, f ∈ I ∧ ↑f x ≠ 0
⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
obtain ⟨g, hI, hgx⟩ := hx
[GOAL]
case refine'_4.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
have := (map_continuous g).continuousAt.eventually_ne hgx
[GOAL]
case refine'_4.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
⊢ ∃ t_1, t_1 ∈ nhdsWithin x t ∧ ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t_1 → 0 < ↑g' x
[PROOFSTEP]
refine'
  ⟨{y : X | g y ≠ 0} ∩ t, mem_nhdsWithin_iff_exists_mem_nhds_inter.mpr ⟨_, this, Set.Subset.rfl⟩,
    ⟨⟨fun x => ‖g x‖₊ ^ 2, (map_continuous g).nnnorm.pow 2⟩, _, fun x hx => pow_pos (norm_pos_iff.mpr hx.1) 2⟩⟩
[GOAL]
case refine'_4.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2) ∈ I
[PROOFSTEP]
convert I.mul_mem_left (star g) hI
[GOAL]
case h.e'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2) = star g * g
[PROOFSTEP]
ext
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
a✝ : X
⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (mk fun x => ‖↑g x‖₊ ^ 2)) a✝ = ↑(star g * g) a✝
[PROOFSTEP]
simp only [comp_apply, ContinuousMap.coe_coe, coe_mk, algebraMapClm_toFun, map_pow, mul_apply, star_apply, star_def]
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
a✝ : X
⊢ ↑(algebraMap ℝ≥0 𝕜) ‖↑g a✝‖₊ ^ 2 = ↑(starRingEnd 𝕜) (↑g a✝) * ↑g a✝
[PROOFSTEP]
simp only [normSq_eq_def', IsROrC.conj_mul, ofReal_pow]
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
x : X
g : C(X, 𝕜)
hI : g ∈ I
hgx : ↑g x ≠ 0
this : ∀ᶠ (z : X) in nhds x, ↑g z ≠ 0
a✝ : X
⊢ ↑(algebraMap ℝ≥0 𝕜) ‖↑g a✝‖₊ ^ 2 = ↑‖↑g a✝‖ ^ 2
[PROOFSTEP]
rfl
  /- Get the function `g'` which is guaranteed to exist above. By the extreme value theorem and
      compactness of `t`, there is some `0 < c` such that `c ≤ g' x` for all `x ∈ t`. Then by
      `exists_mul_le_one_eqOn_ge` there is some `g` for which `g * g'` is the desired function. -/
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
this : ∃ g', comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I ∧ ∀ (x : X), x ∈ t → 0 < ↑g' x
⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
[PROOFSTEP]
obtain ⟨g', hI', hgt'⟩ := this
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
[PROOFSTEP]
obtain ⟨c, hc, hgc'⟩ : ∃ (c : _) (_ : 0 < c), ∀ y : X, y ∈ t → c ≤ g' y :=
  t.eq_empty_or_nonempty.elim (fun ht' => ⟨1, zero_lt_one, fun y hy => False.elim (by rwa [ht'] at hy )⟩) fun ht' =>
    let ⟨x, hx, hx'⟩ := ht.isCompact.exists_forall_le ht' (map_continuous g').continuousOn
    ⟨g' x, hgt' x hx, hx'⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
ht' : t = ∅
y : X
hy : y ∈ t
⊢ False
[PROOFSTEP]
rwa [ht'] at hy
[GOAL]
case intro.intro.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
c : ℝ≥0
hc : 0 < c
hgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y
⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
[PROOFSTEP]
obtain ⟨g, hg, hgc⟩ := exists_mul_le_one_eqOn_ge g' hc
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
c : ℝ≥0
hc : 0 < c
hgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y
g : C(X, ℝ≥0)
hg : ∀ (x : X), ↑(g * g') x ≤ 1
hgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}
⊢ ∃ g, comp (↑(algebraMapClm ℝ≥0 𝕜)) g ∈ I ∧ (∀ (x : X), ↑g x ≤ 1) ∧ Set.EqOn (↑g) 1 t
[PROOFSTEP]
refine' ⟨g * g', _, hg, hgc.mono hgc'⟩
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
c : ℝ≥0
hc : 0 < c
hgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y
g : C(X, ℝ≥0)
hg : ∀ (x : X), ↑(g * g') x ≤ 1
hgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g') ∈ I
[PROOFSTEP]
convert I.mul_mem_left ((algebraMapClm ℝ≥0 𝕜 : C(ℝ≥0, 𝕜)).comp g) hI'
[GOAL]
case h.e'_4
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
c : ℝ≥0
hc : 0 < c
hgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y
g : C(X, ℝ≥0)
hg : ∀ (x : X), ↑(g * g') x ≤ 1
hgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}
⊢ comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g') = comp (↑(algebraMapClm ℝ≥0 𝕜)) g * comp (↑(algebraMapClm ℝ≥0 𝕜)) g'
[PROOFSTEP]
ext
[GOAL]
case h.e'_4.h
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
f : C(X, 𝕜)
hf : f ∈ idealOfSet 𝕜 (setOfIdeal I)
ε : ℝ≥0
hε : 0 < ε
t : Set X := {x | ε / 2 ≤ ‖↑f x‖₊}
ht : IsClosed t
htI : Disjoint t (setOfIdeal I)ᶜ
g' : C(X, ℝ≥0)
hI' : comp (↑(algebraMapClm ℝ≥0 𝕜)) g' ∈ I
hgt' : ∀ (x : X), x ∈ t → 0 < ↑g' x
c : ℝ≥0
hc : 0 < c
hgc' : ∀ (y : X), y ∈ t → c ≤ ↑g' y
g : C(X, ℝ≥0)
hg : ∀ (x : X), ↑(g * g') x ≤ 1
hgc : Set.EqOn (↑(g * g')) 1 {x | c ≤ ↑g' x}
a✝ : X
⊢ ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) (g * g')) a✝ =
    ↑(comp (↑(algebraMapClm ℝ≥0 𝕜)) g * comp (↑(algebraMapClm ℝ≥0 𝕜)) g') a✝
[PROOFSTEP]
simp only [algebraMapClm_coe, comp_apply, mul_apply, ContinuousMap.coe_coe, map_mul]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
⊢ setOfIdeal (idealOfSet 𝕜 s) = interior s
[PROOFSTEP]
refine'
  Set.Subset.antisymm
    ((setOfIdeal_open (idealOfSet 𝕜 s)).subset_interior_iff.mpr fun x hx =>
      let ⟨f, hf, hfx⟩ := mem_setOfIdeal.mp hx
      Set.not_mem_compl_iff.mp (mt (@hf x) hfx))
    fun x hx =>
    _
      -- If `x ∉ closure sᶜ`, we must produce `f : C(X, 𝕜)` which is zero on `sᶜ` and `f x ≠ 0`.
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ interior s
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
[PROOFSTEP]
rw [← compl_compl (interior s), ← closure_compl] at hx
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ x ∈ setOfIdeal (idealOfSet 𝕜 s)
[PROOFSTEP]
simp_rw [mem_setOfIdeal, mem_idealOfSet]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0
[PROOFSTEP]
haveI : NormalSpace X := normalOfCompactT2
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
this : NormalSpace X
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0
[PROOFSTEP]
obtain ⟨g, hgs, hgx : Set.EqOn g 1 { x }, -⟩ :=
  exists_continuous_zero_one_of_closed isClosed_closure isClosed_singleton (Set.disjoint_singleton_right.mpr hx)
[GOAL]
case intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
this : NormalSpace X
g : C(X, ℝ)
hgs : Set.EqOn (↑g) 0 (closure sᶜ)
hgx : Set.EqOn (↑g) 1 {x}
⊢ ∃ f, (∀ ⦃x : X⦄, x ∈ sᶜ → ↑f x = 0) ∧ ↑f x ≠ 0
[PROOFSTEP]
exact
  ⟨⟨fun x => g x, continuous_ofReal.comp (map_continuous g)⟩, by
    simpa only [coe_mk, ofReal_eq_zero] using fun x hx => hgs (subset_closure hx), by
    simpa only [coe_mk, hgx (Set.mem_singleton x), Pi.one_apply, IsROrC.ofReal_one] using one_ne_zero⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
this : NormalSpace X
g : C(X, ℝ)
hgs : Set.EqOn (↑g) 0 (closure sᶜ)
hgx : Set.EqOn (↑g) 1 {x}
⊢ ∀ ⦃x : X⦄, x ∈ sᶜ → ↑(mk fun x => ↑(↑g x)) x = 0
[PROOFSTEP]
simpa only [coe_mk, ofReal_eq_zero] using fun x hx => hgs (subset_closure hx)
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Set X
x : X
hx : x ∈ (closure sᶜ)ᶜ
this : NormalSpace X
g : C(X, ℝ)
hgs : Set.EqOn (↑g) 0 (closure sᶜ)
hgx : Set.EqOn (↑g) 1 {x}
⊢ ↑(mk fun x => ↑(↑g x)) x ≠ 0
[PROOFSTEP]
simpa only [coe_mk, hgx (Set.mem_singleton x), Pi.one_apply, IsROrC.ofReal_one] using one_ne_zero
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Opens X
⊢ Ideal.IsMaximal (idealOfSet 𝕜 ↑s) ↔ IsCoatom s
[PROOFSTEP]
rw [Ideal.isMaximal_def]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Opens X
⊢ IsCoatom (idealOfSet 𝕜 ↑s) ↔ IsCoatom s
[PROOFSTEP]
refine' (idealOpensGI X 𝕜).isCoatom_iff (fun I hI => _) s
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Opens X
I : Ideal C(X, 𝕜)
hI : IsCoatom I
⊢ idealOfSet 𝕜 ↑(opensOfIdeal I) = I
[PROOFSTEP]
rw [← Ideal.isMaximal_def] at hI
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
s : Opens X
I : Ideal C(X, 𝕜)
hI : Ideal.IsMaximal I
⊢ idealOfSet 𝕜 ↑(opensOfIdeal I) = I
[PROOFSTEP]
exact idealOfSet_ofIdeal_isClosed inferInstance
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : Ideal.IsMaximal I
⊢ ∃ x, setOfIdeal I = {x}ᶜ
[PROOFSTEP]
have h : (idealOfSet 𝕜 (setOfIdeal I)).IsMaximal :=
  (idealOfSet_ofIdeal_isClosed (inferInstance : IsClosed (I : Set C(X, 𝕜)))).symm ▸ hI
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : Ideal.IsMaximal I
h : Ideal.IsMaximal (idealOfSet 𝕜 (setOfIdeal I))
⊢ ∃ x, setOfIdeal I = {x}ᶜ
[PROOFSTEP]
obtain ⟨x, hx⟩ := Opens.isCoatom_iff.1 ((idealOfSet_isMaximal_iff 𝕜 (opensOfIdeal I)).1 h)
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : Ideal.IsMaximal I
h : Ideal.IsMaximal (idealOfSet 𝕜 (setOfIdeal I))
x : X
hx : opensOfIdeal I = Closeds.compl (Closeds.singleton x)
⊢ ∃ x, setOfIdeal I = {x}ᶜ
[PROOFSTEP]
refine ⟨x, congr_arg (fun (s : Opens X) => (s : Set X)) hx⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : IsClosed ↑I
⊢ Ideal.IsMaximal I ↔ ∃ x, idealOfSet 𝕜 {x}ᶜ = I
[PROOFSTEP]
refine'
  ⟨_, fun h =>
    let ⟨x, hx⟩ := h
    hx ▸ idealOf_compl_singleton_isMaximal 𝕜 x⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : IsClosed ↑I
⊢ Ideal.IsMaximal I → ∃ x, idealOfSet 𝕜 {x}ᶜ = I
[PROOFSTEP]
intro hI'
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : IsClosed ↑I
hI' : Ideal.IsMaximal I
⊢ ∃ x, idealOfSet 𝕜 {x}ᶜ = I
[PROOFSTEP]
obtain ⟨x, hx⟩ := setOfIdeal_eq_compl_singleton I
[GOAL]
case intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : IsClosed ↑I
hI' : Ideal.IsMaximal I
x : X
hx : setOfIdeal I = {x}ᶜ
⊢ ∃ x, idealOfSet 𝕜 {x}ᶜ = I
[PROOFSTEP]
exact
  ⟨x, by simpa only [idealOfSet_ofIdeal_eq_closure, I.closure_eq_of_isClosed hI] using congr_arg (idealOfSet 𝕜) hx.symm⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : IsROrC 𝕜
inst✝² : TopologicalSpace X
inst✝¹ : CompactSpace X
inst✝ : T2Space X
I : Ideal C(X, 𝕜)
hI : IsClosed ↑I
hI' : Ideal.IsMaximal I
x : X
hx : setOfIdeal I = {x}ᶜ
⊢ idealOfSet 𝕜 {x}ᶜ = I
[PROOFSTEP]
simpa only [idealOfSet_ofIdeal_eq_closure, I.closure_eq_of_isClosed hI] using congr_arg (idealOfSet 𝕜) hx.symm
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : LocallyCompactSpace X
inst✝⁴ : CommRing 𝕜
inst✝³ : TopologicalSpace 𝕜
inst✝² : TopologicalRing 𝕜
inst✝¹ : Nontrivial 𝕜
inst✝ : NoZeroDivisors 𝕜
x : X
⊢ ContinuousLinearMap.mk
      {
        toAddHom :=
          { toFun := fun f => ↑f x,
            map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) },
        map_smul' :=
          (_ :
            ∀ (z : 𝕜) (f : C(X, 𝕜)),
              AddHom.toFun
                  { toFun := fun f => ↑f x,
                    map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }
                  (z • f) =
                AddHom.toFun
                  { toFun := fun f => ↑f x,
                    map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }
                  (z • f)) } ∈
    characterSpace 𝕜 C(X, 𝕜)
[PROOFSTEP]
rw [CharacterSpace.eq_set_map_one_map_mul]
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : LocallyCompactSpace X
inst✝⁴ : CommRing 𝕜
inst✝³ : TopologicalSpace 𝕜
inst✝² : TopologicalRing 𝕜
inst✝¹ : Nontrivial 𝕜
inst✝ : NoZeroDivisors 𝕜
x : X
⊢ ContinuousLinearMap.mk
      {
        toAddHom :=
          { toFun := fun f => ↑f x,
            map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) },
        map_smul' :=
          (_ :
            ∀ (z : 𝕜) (f : C(X, 𝕜)),
              AddHom.toFun
                  { toFun := fun f => ↑f x,
                    map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }
                  (z • f) =
                AddHom.toFun
                  { toFun := fun f => ↑f x,
                    map_add' := (_ : ∀ (f g : C(X, 𝕜)), (fun f => ↑f x) (f + g) = (fun f => ↑f x) (f + g)) }
                  (z • f)) } ∈
    {φ | ↑φ 1 = 1 ∧ ∀ (x y : C(X, 𝕜)), ↑φ (x * y) = ↑φ x * ↑φ y}
[PROOFSTEP]
exact ⟨rfl, fun f g => rfl⟩
[GOAL]
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
⊢ Bijective ↑(continuousMapEval X 𝕜)
[PROOFSTEP]
refine' ⟨fun x y hxy => _, fun φ => _⟩
[GOAL]
case refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : ↑(continuousMapEval X 𝕜) x = ↑(continuousMapEval X 𝕜) y
⊢ x = y
[PROOFSTEP]
contrapose! hxy
[GOAL]
case refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : x ≠ y
⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y
[PROOFSTEP]
haveI := @normalOfCompactT2 X _ _ _
[GOAL]
case refine'_1
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : x ≠ y
this : NormalSpace X
⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y
[PROOFSTEP]
rcases exists_continuous_zero_one_of_closed (isClosed_singleton : _root_.IsClosed { x })
    (isClosed_singleton : _root_.IsClosed { y }) (Set.disjoint_singleton.mpr hxy) with
  ⟨f, fx, fy, -⟩
[GOAL]
case refine'_1.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : x ≠ y
this : NormalSpace X
f : C(X, ℝ)
fx : Set.EqOn (↑f) 0 {x}
fy : Set.EqOn (↑f) 1 {y}
⊢ ↑(continuousMapEval X 𝕜) x ≠ ↑(continuousMapEval X 𝕜) y
[PROOFSTEP]
rw [FunLike.ne_iff]
[GOAL]
case refine'_1.intro.intro.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : x ≠ y
this : NormalSpace X
f : C(X, ℝ)
fx : Set.EqOn (↑f) 0 {x}
fy : Set.EqOn (↑f) 1 {y}
⊢ ∃ a, ↑(↑(continuousMapEval X 𝕜) x) a ≠ ↑(↑(continuousMapEval X 𝕜) y) a
[PROOFSTEP]
use(⟨fun (x : ℝ) => (x : 𝕜), IsROrC.continuous_ofReal⟩ : C(ℝ, 𝕜)).comp f
[GOAL]
case h
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
x y : X
hxy : x ≠ y
this : NormalSpace X
f : C(X, ℝ)
fx : Set.EqOn (↑f) 0 {x}
fy : Set.EqOn (↑f) 1 {y}
⊢ ↑(↑(continuousMapEval X 𝕜) x) (ContinuousMap.comp (mk fun x => ↑x) f) ≠
    ↑(↑(continuousMapEval X 𝕜) y) (ContinuousMap.comp (mk fun x => ↑x) f)
[PROOFSTEP]
simpa only [continuousMapEval_apply_apply, ContinuousMap.comp_apply, coe_mk, Ne.def, IsROrC.ofReal_inj] using
  ((fx (Set.mem_singleton x)).symm ▸ (fy (Set.mem_singleton y)).symm ▸ zero_ne_one : f x ≠ f y)
[GOAL]
case refine'_2
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
φ : ↑(characterSpace 𝕜 C(X, 𝕜))
⊢ ∃ a, ↑(continuousMapEval X 𝕜) a = φ
[PROOFSTEP]
obtain ⟨x, hx⟩ := (ideal_isMaximal_iff (RingHom.ker φ)).mp inferInstance
[GOAL]
case refine'_2.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
φ : ↑(characterSpace 𝕜 C(X, 𝕜))
x : X
hx : idealOfSet 𝕜 {x}ᶜ = RingHom.ker φ
⊢ ∃ a, ↑(continuousMapEval X 𝕜) a = φ
[PROOFSTEP]
refine' ⟨x, CharacterSpace.ext_ker <| Ideal.ext fun f => _⟩
[GOAL]
case refine'_2.intro
X : Type u_1
𝕜 : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : CompactSpace X
inst✝¹ : T2Space X
inst✝ : IsROrC 𝕜
φ : ↑(characterSpace 𝕜 C(X, 𝕜))
x : X
hx : idealOfSet 𝕜 {x}ᶜ = RingHom.ker φ
f : C(X, 𝕜)
⊢ f ∈ RingHom.ker (↑(continuousMapEval X 𝕜) x) ↔ f ∈ RingHom.ker φ
[PROOFSTEP]
simpa only [RingHom.mem_ker, continuousMapEval_apply_apply, mem_idealOfSet_compl_singleton, RingHom.mem_ker] using
  SetLike.ext_iff.mp hx f


[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : T2Space α
f : α → α
x y : α
hy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)
hf : ContinuousAt f y
⊢ IsFixedPt f y
[PROOFSTEP]
refine' tendsto_nhds_unique ((tendsto_add_atTop_iff_nat 1).1 _) hy
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : T2Space α
f : α → α
x y : α
hy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)
hf : ContinuousAt f y
⊢ Tendsto (fun n => f^[n + 1] x) atTop (𝓝 (f y))
[PROOFSTEP]
simp only [iterate_succ' f]
[GOAL]
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : T2Space α
f : α → α
x y : α
hy : Tendsto (fun n => f^[n] x) atTop (𝓝 y)
hf : ContinuousAt f y
⊢ Tendsto (fun n => (f ∘ f^[n]) x) atTop (𝓝 (f y))
[PROOFSTEP]
exact hf.tendsto.comp hy


[GOAL]
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : Countable ι
inst✝ : ∀ (i : ι), Countable (α i)
⊢ Countable (Π₀ (i : ι), α i)
[PROOFSTEP]
classical
let _ := Encodable.ofCountable ι
let _ := fun i ↦ Encodable.ofCountable (α i)
infer_instance
[GOAL]
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : Countable ι
inst✝ : ∀ (i : ι), Countable (α i)
⊢ Countable (Π₀ (i : ι), α i)
[PROOFSTEP]
let _ := Encodable.ofCountable ι
[GOAL]
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : Countable ι
inst✝ : ∀ (i : ι), Countable (α i)
x✝ : Encodable ι := Encodable.ofCountable ι
⊢ Countable (Π₀ (i : ι), α i)
[PROOFSTEP]
let _ := fun i ↦ Encodable.ofCountable (α i)
[GOAL]
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : Countable ι
inst✝ : ∀ (i : ι), Countable (α i)
x✝¹ : Encodable ι := Encodable.ofCountable ι
x✝ : (i : ι) → Encodable (α i) := fun i => Encodable.ofCountable (α i)
⊢ Countable (Π₀ (i : ι), α i)
[PROOFSTEP]
infer_instance


[GOAL]
n : ℕ+
⊢ 1 + natPred n = ↑n
[PROOFSTEP]
rw [natPred, add_tsub_cancel_iff_le.mpr <| show 1 ≤ (n : ℕ) from n.2]
[GOAL]
a b : ℕ+
⊢ ↑(a - b) = if b < a then ↑a - ↑b else 1
[PROOFSTEP]
change (toPNat' _ : ℕ) = ite _ _ _
[GOAL]
a b : ℕ+
⊢ ↑(toPNat' (↑a - ↑b)) = if b < a then ↑a - ↑b else 1
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
a b : ℕ+
h : b < a
⊢ ↑(toPNat' (↑a - ↑b)) = ↑a - ↑b
[PROOFSTEP]
exact toPNat'_coe (tsub_pos_of_lt h)
[GOAL]
case neg
a b : ℕ+
h : ¬b < a
⊢ ↑(toPNat' (↑a - ↑b)) = 1
[PROOFSTEP]
rw [tsub_eq_zero_iff_le.mpr (le_of_not_gt h : (a : ℕ) ≤ b)]
[GOAL]
case neg
a b : ℕ+
h : ¬b < a
⊢ ↑(toPNat' 0) = 1
[PROOFSTEP]
rfl
[GOAL]
a b : ℕ+
h : a < b
⊢ ↑(a + (b - a)) = ↑b
[PROOFSTEP]
rw [add_coe, sub_coe, if_pos h]
[GOAL]
a b : ℕ+
h : a < b
⊢ ↑a + (↑b - ↑a) = ↑b
[PROOFSTEP]
exact add_tsub_cancel_of_le h.le
[GOAL]
n : ℕ
property✝ : 0 < n + 2
x✝ : { val := n + 2, property := property✝ } ≠ 1
⊢ 0 < n + 1
[PROOFSTEP]
simp
[GOAL]
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
⊢ p a
[PROOFSTEP]
apply strongInductionOn a
[GOAL]
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
⊢ (k : ℕ+) → ((m : ℕ+) → m < k → p m) → p k
[PROOFSTEP]
rintro ⟨k, kprop⟩ hk
[GOAL]
case mk
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
k : ℕ
kprop : 0 < k
hk : (m : ℕ+) → m < { val := k, property := kprop } → p m
⊢ p { val := k, property := kprop }
[PROOFSTEP]
cases' k with k
[GOAL]
case mk.zero
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
kprop : 0 < zero
hk : (m : ℕ+) → m < { val := zero, property := kprop } → p m
⊢ p { val := zero, property := kprop }
[PROOFSTEP]
exact (lt_irrefl 0 kprop).elim
[GOAL]
case mk.succ
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
k : ℕ
kprop : 0 < succ k
hk : (m : ℕ+) → m < { val := succ k, property := kprop } → p m
⊢ p { val := succ k, property := kprop }
[PROOFSTEP]
cases' k with k
[GOAL]
case mk.succ.zero
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
kprop : 0 < succ zero
hk : (m : ℕ+) → m < { val := succ zero, property := kprop } → p m
⊢ p { val := succ zero, property := kprop }
[PROOFSTEP]
exact hz
[GOAL]
case mk.succ.succ
p : ℕ+ → Sort u_1
a : ℕ+
hz : p 1
hi : (n : ℕ+) → ((m : ℕ+) → m ≤ n → p m) → p (n + 1)
k : ℕ
kprop : 0 < succ (succ k)
hk : (m : ℕ+) → m < { val := succ (succ k), property := kprop } → p m
⊢ p { val := succ (succ k), property := kprop }
[PROOFSTEP]
exact hi ⟨k.succ, Nat.succ_pos _⟩ fun m hm => hk _ (lt_succ_iff.2 hm)
[GOAL]
n : ℕ+
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
⊢ p n
[PROOFSTEP]
rcases n with ⟨n, h⟩
[GOAL]
case mk
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h : 0 < n
⊢ p { val := n, property := h }
[PROOFSTEP]
induction' n with n IH
[GOAL]
case mk.zero
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h✝ : 0 < n
h : 0 < zero
⊢ p { val := zero, property := h }
[PROOFSTEP]
exact absurd h (by decide)
[GOAL]
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h✝ : 0 < n
h : 0 < zero
⊢ ¬0 < zero
[PROOFSTEP]
decide
[GOAL]
case mk.succ
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n✝ : ℕ
h✝ : 0 < n✝
n : ℕ
IH : (h : 0 < n) → p { val := n, property := h }
h : 0 < succ n
⊢ p { val := succ n, property := h }
[PROOFSTEP]
cases' n with n
[GOAL]
case mk.succ.zero
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h✝ : 0 < n
IH : (h : 0 < zero) → p { val := zero, property := h }
h : 0 < succ zero
⊢ p { val := succ zero, property := h }
[PROOFSTEP]
exact p1
[GOAL]
case mk.succ.succ
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n✝ : ℕ
h✝ : 0 < n✝
n : ℕ
IH : (h : 0 < succ n) → p { val := succ n, property := h }
h : 0 < succ (succ n)
⊢ p { val := succ (succ n), property := h }
[PROOFSTEP]
exact hp _ (IH n.succ_pos)
[GOAL]
n : ℕ+
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
⊢ recOn (n + 1) p1 hp = hp n (recOn n p1 hp)
[PROOFSTEP]
cases' n with n h
[GOAL]
case mk
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h : 0 < n
⊢ recOn ({ val := n, property := h } + 1) p1 hp =
    hp { val := n, property := h } (recOn { val := n, property := h } p1 hp)
[PROOFSTEP]
cases n <;> [exact absurd h (by decide); rfl]
[GOAL]
case mk
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n : ℕ
h : 0 < n
⊢ recOn ({ val := n, property := h } + 1) p1 hp =
    hp { val := n, property := h } (recOn { val := n, property := h } p1 hp)
[PROOFSTEP]
cases n
[GOAL]
case mk.zero
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
h : 0 < zero
⊢ recOn ({ val := zero, property := h } + 1) p1 hp =
    hp { val := zero, property := h } (recOn { val := zero, property := h } p1 hp)
[PROOFSTEP]
exact absurd h (by decide)
[GOAL]
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
h : 0 < zero
⊢ ¬0 < zero
[PROOFSTEP]
decide
[GOAL]
case mk.succ
p : ℕ+ → Sort u_1
p1 : p 1
hp : (n : ℕ+) → p n → p (n + 1)
n✝ : ℕ
h : 0 < succ n✝
⊢ recOn ({ val := succ n✝, property := h } + 1) p1 hp =
    hp { val := succ n✝, property := h } (recOn { val := succ n✝, property := h } p1 hp)
[PROOFSTEP]
rfl
[GOAL]
k : ℕ+
q : ℕ
x✝ : ¬(0 = 0 ∧ q + 1 = 0)
⊢ ↑(modDivAux k 0 (q + 1)).fst + ↑k * (modDivAux k 0 (q + 1)).snd = 0 + ↑k * (q + 1)
[PROOFSTEP]
change (k : ℕ) + (k : ℕ) * (q + 1).pred = 0 + (k : ℕ) * (q + 1)
[GOAL]
k : ℕ+
q : ℕ
x✝ : ¬(0 = 0 ∧ q + 1 = 0)
⊢ ↑k + ↑k * pred (q + 1) = 0 + ↑k * (q + 1)
[PROOFSTEP]
rw [Nat.pred_succ, Nat.mul_succ, zero_add, add_comm]
[GOAL]
m k : ℕ+
⊢ ↑(mod m k) + ↑k * div m k = ↑m
[PROOFSTEP]
let h₀ := Nat.mod_add_div (m : ℕ) (k : ℕ)
[GOAL]
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
⊢ ↑(mod m k) + ↑k * div m k = ↑m
[PROOFSTEP]
have : ¬((m : ℕ) % (k : ℕ) = 0 ∧ (m : ℕ) / (k : ℕ) = 0) :=
  by
  rintro ⟨hr, hq⟩
  rw [hr, hq, mul_zero, zero_add] at h₀
  exact (m.ne_zero h₀.symm).elim
[GOAL]
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
⊢ ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)
[PROOFSTEP]
rintro ⟨hr, hq⟩
[GOAL]
case intro
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
hr : ↑m % ↑k = 0
hq : ↑m / ↑k = 0
⊢ False
[PROOFSTEP]
rw [hr, hq, mul_zero, zero_add] at h₀
[GOAL]
case intro
m k : ℕ+
h₀ : 0 = ↑m
hr : ↑m % ↑k = 0
hq : ↑m / ↑k = 0
⊢ False
[PROOFSTEP]
exact (m.ne_zero h₀.symm).elim
[GOAL]
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
this : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)
⊢ ↑(mod m k) + ↑k * div m k = ↑m
[PROOFSTEP]
have := modDivAux_spec k ((m : ℕ) % (k : ℕ)) ((m : ℕ) / (k : ℕ)) this
[GOAL]
m k : ℕ+
h₀ : ↑m % ↑k + ↑k * (↑m / ↑k) = ↑m := Nat.mod_add_div ↑m ↑k
this✝ : ¬(↑m % ↑k = 0 ∧ ↑m / ↑k = 0)
this : ↑(modDivAux k (↑m % ↑k) (↑m / ↑k)).fst + ↑k * (modDivAux k (↑m % ↑k) (↑m / ↑k)).snd = ↑m % ↑k + ↑k * (↑m / ↑k)
⊢ ↑(mod m k) + ↑k * div m k = ↑m
[PROOFSTEP]
exact this.trans h₀
[GOAL]
m k : ℕ+
⊢ ↑(mod m k) + div m k * ↑k = ↑m
[PROOFSTEP]
rw [mul_comm]
[GOAL]
m k : ℕ+
⊢ ↑(mod m k) + ↑k * div m k = ↑m
[PROOFSTEP]
exact mod_add_div _ _
[GOAL]
m k : ℕ+
⊢ div m k * ↑k + ↑(mod m k) = ↑m
[PROOFSTEP]
rw [mul_comm]
[GOAL]
m k : ℕ+
⊢ ↑k * div m k + ↑(mod m k) = ↑m
[PROOFSTEP]
exact div_add_mod _ _
[GOAL]
m k : ℕ+
⊢ mod m k ≤ m ∧ mod m k ≤ k
[PROOFSTEP]
change (mod m k : ℕ) ≤ (m : ℕ) ∧ (mod m k : ℕ) ≤ (k : ℕ)
[GOAL]
m k : ℕ+
⊢ ↑(mod m k) ≤ ↑m ∧ ↑(mod m k) ≤ ↑k
[PROOFSTEP]
rw [mod_coe]
[GOAL]
m k : ℕ+
⊢ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑m ∧ (if ↑m % ↑k = 0 then ↑k else ↑m % ↑k) ≤ ↑k
[PROOFSTEP]
split_ifs with h
[GOAL]
case pos
m k : ℕ+
h : ↑m % ↑k = 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k
[PROOFSTEP]
have hm : (m : ℕ) > 0 := m.pos
[GOAL]
case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑m > 0
⊢ ↑k ≤ ↑m ∧ ↑k ≤ ↑k
[PROOFSTEP]
rw [← Nat.mod_add_div (m : ℕ) (k : ℕ), h, zero_add] at hm ⊢
[GOAL]
case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
by_cases h₁ : (m : ℕ) / (k : ℕ) = 0
[GOAL]
case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
rw [h₁, mul_zero] at hm
[GOAL]
case pos
m k : ℕ+
h : ↑m % ↑k = 0
hm : 0 > 0
h₁ : ↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
exact (lt_irrefl _ hm).elim
[GOAL]
case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
let h₂ : (k : ℕ) * 1 ≤ k * (m / k) :=
  -- Porting note : Specified type of `h₂` explicitly because `rw` could not unify
          -- `succ 0` with `1`.Nat.mul_le_mul_left (k : ℕ) (Nat.succ_le_of_lt (Nat.pos_of_ne_zero h₁))
[GOAL]
case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k * 1 ≤ ↑k * (↑m / ↑k) := Nat.mul_le_mul_left (↑k) (succ_le_of_lt (Nat.pos_of_ne_zero h₁))
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
rw [mul_one] at h₂
[GOAL]
case neg
m k : ℕ+
h : ↑m % ↑k = 0
hm : ↑k * (↑m / ↑k) > 0
h₁ : ¬↑m / ↑k = 0
h₂ : ↑k ≤ ↑k * (↑m / ↑k)
⊢ ↑k ≤ ↑k * (↑m / ↑k) ∧ ↑k ≤ ↑k
[PROOFSTEP]
exact ⟨h₂, le_refl (k : ℕ)⟩
[GOAL]
case neg
m k : ℕ+
h : ¬↑m % ↑k = 0
⊢ ↑m % ↑k ≤ ↑m ∧ ↑m % ↑k ≤ ↑k
[PROOFSTEP]
exact ⟨Nat.mod_le (m : ℕ) (k : ℕ), (Nat.mod_lt (m : ℕ) k.pos).le⟩
[GOAL]
k m : ℕ+
⊢ k ∣ m ↔ ↑k ∣ ↑m
[PROOFSTEP]
constructor
[GOAL]
case mp
k m : ℕ+
⊢ k ∣ m → ↑k ∣ ↑m
[PROOFSTEP]
intro h
[GOAL]
case mpr
k m : ℕ+
⊢ ↑k ∣ ↑m → k ∣ m
[PROOFSTEP]
intro h
[GOAL]
case mp
k m : ℕ+
h : k ∣ m
⊢ ↑k ∣ ↑m
[PROOFSTEP]
rcases h with ⟨_, rfl⟩
[GOAL]
case mp.intro
k w✝ : ℕ+
⊢ ↑k ∣ ↑(k * w✝)
[PROOFSTEP]
apply dvd_mul_right
[GOAL]
case mpr
k m : ℕ+
h : ↑k ∣ ↑m
⊢ k ∣ m
[PROOFSTEP]
rcases h with ⟨a, h⟩
[GOAL]
case mpr.intro
k m : ℕ+
a : ℕ
h : ↑m = ↑k * a
⊢ k ∣ m
[PROOFSTEP]
cases a with
| zero =>
  contrapose h
  apply ne_zero
| succ n =>
  use⟨n.succ, n.succ_pos⟩
  rw [← coe_inj, h, mul_coe, mk_coe]
[GOAL]
case mpr.intro
k m : ℕ+
a : ℕ
h : ↑m = ↑k * a
⊢ k ∣ m
[PROOFSTEP]
cases a with
| zero =>
  contrapose h
  apply ne_zero
| succ n =>
  use⟨n.succ, n.succ_pos⟩
  rw [← coe_inj, h, mul_coe, mk_coe]
[GOAL]
case mpr.intro.zero
k m : ℕ+
h : ↑m = ↑k * zero
⊢ k ∣ m
[PROOFSTEP]

| zero =>
  contrapose h
  apply ne_zero
[GOAL]
case mpr.intro.zero
k m : ℕ+
h : ↑m = ↑k * zero
⊢ k ∣ m
[PROOFSTEP]
contrapose h
[GOAL]
case mpr.intro.zero
k m : ℕ+
h : ¬k ∣ m
⊢ ¬↑m = ↑k * zero
[PROOFSTEP]
apply ne_zero
[GOAL]
case mpr.intro.succ
k m : ℕ+
n : ℕ
h : ↑m = ↑k * succ n
⊢ k ∣ m
[PROOFSTEP]

| succ n =>
  use⟨n.succ, n.succ_pos⟩
  rw [← coe_inj, h, mul_coe, mk_coe]
[GOAL]
case mpr.intro.succ
k m : ℕ+
n : ℕ
h : ↑m = ↑k * succ n
⊢ k ∣ m
[PROOFSTEP]
use⟨n.succ, n.succ_pos⟩
[GOAL]
case h
k m : ℕ+
n : ℕ
h : ↑m = ↑k * succ n
⊢ m = k * { val := succ n, property := (_ : 0 < succ n) }
[PROOFSTEP]
rw [← coe_inj, h, mul_coe, mk_coe]
[GOAL]
k m : ℕ+
⊢ k ∣ m ↔ mod m k = k
[PROOFSTEP]
rw [dvd_iff]
[GOAL]
k m : ℕ+
⊢ ↑k ∣ ↑m ↔ mod m k = k
[PROOFSTEP]
rw [Nat.dvd_iff_mod_eq_zero]
[GOAL]
k m : ℕ+
⊢ ↑m % ↑k = 0 ↔ mod m k = k
[PROOFSTEP]
constructor
[GOAL]
case mp
k m : ℕ+
⊢ ↑m % ↑k = 0 → mod m k = k
[PROOFSTEP]
intro h
[GOAL]
case mp
k m : ℕ+
h : ↑m % ↑k = 0
⊢ mod m k = k
[PROOFSTEP]
apply PNat.eq
[GOAL]
case mp.a
k m : ℕ+
h : ↑m % ↑k = 0
⊢ ↑(mod m k) = ↑k
[PROOFSTEP]
rw [mod_coe, if_pos h]
[GOAL]
case mpr
k m : ℕ+
⊢ mod m k = k → ↑m % ↑k = 0
[PROOFSTEP]
intro h
[GOAL]
case mpr
k m : ℕ+
h : mod m k = k
⊢ ↑m % ↑k = 0
[PROOFSTEP]
by_cases h' : (m : ℕ) % (k : ℕ) = 0
[GOAL]
case pos
k m : ℕ+
h : mod m k = k
h' : ↑m % ↑k = 0
⊢ ↑m % ↑k = 0
[PROOFSTEP]
exact h'
[GOAL]
case neg
k m : ℕ+
h : mod m k = k
h' : ¬↑m % ↑k = 0
⊢ ↑m % ↑k = 0
[PROOFSTEP]
replace h : (mod m k : ℕ) = (k : ℕ) := congr_arg _ h
[GOAL]
case neg
k m : ℕ+
h' : ¬↑m % ↑k = 0
h : ↑(mod m k) = ↑k
⊢ ↑m % ↑k = 0
[PROOFSTEP]
rw [mod_coe, if_neg h'] at h
[GOAL]
case neg
k m : ℕ+
h' : ¬↑m % ↑k = 0
h : ↑m % ↑k = ↑k
⊢ ↑m % ↑k = 0
[PROOFSTEP]
exact ((Nat.mod_lt (m : ℕ) k.pos).ne h).elim
[GOAL]
m n : ℕ+
⊢ m ∣ n → m ≤ n
[PROOFSTEP]
rw [dvd_iff']
[GOAL]
m n : ℕ+
⊢ mod n m = m → m ≤ n
[PROOFSTEP]
intro h
[GOAL]
m n : ℕ+
h : mod n m = m
⊢ m ≤ n
[PROOFSTEP]
rw [← h]
[GOAL]
m n : ℕ+
h : mod n m = m
⊢ mod n m ≤ n
[PROOFSTEP]
apply (mod_le n m).left
[GOAL]
m k : ℕ+
h : k ∣ m
⊢ k * divExact m k = m
[PROOFSTEP]
apply PNat.eq
[GOAL]
case a
m k : ℕ+
h : k ∣ m
⊢ ↑(k * divExact m k) = ↑m
[PROOFSTEP]
rw [mul_coe]
[GOAL]
case a
m k : ℕ+
h : k ∣ m
⊢ ↑k * ↑(divExact m k) = ↑m
[PROOFSTEP]
change (k : ℕ) * (div m k).succ = m
[GOAL]
case a
m k : ℕ+
h : k ∣ m
⊢ ↑k * succ (div m k) = ↑m
[PROOFSTEP]
rw [← div_add_mod m k, dvd_iff'.mp h, Nat.mul_succ]
[GOAL]
n : ℕ+
a : ℕ
h : a ∣ ↑n
⊢ 0 < a
[PROOFSTEP]
apply pos_iff_ne_zero.2
[GOAL]
n : ℕ+
a : ℕ
h : a ∣ ↑n
⊢ a ≠ 0
[PROOFSTEP]
intro hzero
[GOAL]
n : ℕ+
a : ℕ
h : a ∣ ↑n
hzero : a = 0
⊢ False
[PROOFSTEP]
rw [hzero] at h
[GOAL]
n : ℕ+
a : ℕ
h : 0 ∣ ↑n
hzero : a = 0
⊢ False
[PROOFSTEP]
exact PNat.ne_zero n (eq_zero_of_zero_dvd h)


[GOAL]
a : ℤ
p : ℕ
pp : Fact (Nat.Prime p)
⊢ ↑a = 0 ↔ Int.gcd a ↑p ≠ 1
[PROOFSTEP]
rw [Ne, Int.gcd_comm, Int.gcd_eq_one_iff_coprime, (Nat.prime_iff_prime_int.1 pp.1).coprime_iff_not_dvd,
  Classical.not_not, int_cast_zmod_eq_zero_iff_dvd]


[GOAL]
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x y : L
⊢ ↑χ ⁅x, y⁆ = 0
[PROOFSTEP]
rw [LieHom.map_lie, LieRing.of_associative_ring_bracket, mul_comm, sub_self]
[GOAL]
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x y : L
⊢ ⁅↑χ x, ↑χ y⁆ = 0
[PROOFSTEP]
rw [LieRing.of_associative_ring_bracket, mul_comm, sub_self]
[GOAL]
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ derivedSeries R L 1
⊢ ↑χ x = 0
[PROOFSTEP]
rw [derivedSeries_def, derivedSeriesOfIdeal_succ, derivedSeriesOfIdeal_zero, ← LieSubmodule.mem_coeSubmodule,
  LieSubmodule.lieIdeal_oper_eq_linear_span] at h
[GOAL]
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ↑χ x = 0
[PROOFSTEP]
refine' Submodule.span_induction h _ _ _ _
[GOAL]
case refine'_1
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (x : L), x ∈ {m | ∃ x n, ⁅↑x, ↑n⁆ = m} → ↑χ x = 0
[PROOFSTEP]
rintro y ⟨⟨z, hz⟩, ⟨⟨w, hw⟩, rfl⟩⟩
[GOAL]
case refine'_1.intro.mk.intro.mk
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
z : L
hz : z ∈ ⊤
w : L
hw : w ∈ ⊤
⊢ ↑χ ⁅↑{ val := z, property := hz }, ↑{ val := w, property := hw }⁆ = 0
[PROOFSTEP]
apply lieCharacter_apply_lie
[GOAL]
case refine'_2
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ↑χ 0 = 0
[PROOFSTEP]
exact χ.map_zero
[GOAL]
case refine'_3
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (x y : L), ↑χ x = 0 → ↑χ y = 0 → ↑χ (x + y) = 0
[PROOFSTEP]
intro y z hy hz
[GOAL]
case refine'_3
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
y z : L
hy : ↑χ y = 0
hz : ↑χ z = 0
⊢ ↑χ (y + z) = 0
[PROOFSTEP]
rw [LieHom.map_add, hy, hz, add_zero]
[GOAL]
case refine'_4
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
⊢ ∀ (a : R) (x : L), ↑χ x = 0 → ↑χ (a • x) = 0
[PROOFSTEP]
intro t y hy
[GOAL]
case refine'_4
R : Type u
L : Type v
inst✝² : CommRing R
inst✝¹ : LieRing L
inst✝ : LieAlgebra R L
χ : LieCharacter R L
x : L
h : x ∈ Submodule.span R {m | ∃ x n, ⁅↑x, ↑n⁆ = m}
t : R
y : L
hy : ↑χ y = 0
⊢ ↑χ (t • y) = 0
[PROOFSTEP]
rw [LieHom.map_smul, hy, smul_zero]
[GOAL]
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsLieAbelian L
ψ : Module.Dual R L
x y : L
⊢ AddHom.toFun
      { toAddHom := ψ.toAddHom,
          map_smul' :=
            (_ :
              ∀ (r : R) (x : L),
                AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
      ⁅x, y⁆ =
    ⁅AddHom.toFun
        { toAddHom := ψ.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L),
                  AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
        x,
      AddHom.toFun
        { toAddHom := ψ.toAddHom,
            map_smul' :=
              (_ :
                ∀ (r : R) (x : L),
                  AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
        y⁆
[PROOFSTEP]
rw [LieModule.IsTrivial.trivial, LieRing.of_associative_ring_bracket, mul_comm, sub_self, LinearMap.toFun_eq_coe,
  LinearMap.map_zero]
[GOAL]
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsLieAbelian L
χ : LieCharacter R L
⊢ (fun ψ =>
        {
          toLinearMap :=
            { toAddHom := ψ.toAddHom,
              map_smul' :=
                (_ :
                  ∀ (r : R) (x : L), AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },
          map_lie' :=
            (_ :
              ∀ {x y : L},
                AddHom.toFun
                    { toAddHom := ψ.toAddHom,
                        map_smul' :=
                          (_ :
                            ∀ (r : R) (x : L),
                              AddHom.toFun ψ.toAddHom (r • x) =
                                ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                    ⁅x, y⁆ =
                  ⁅AddHom.toFun
                      { toAddHom := ψ.toAddHom,
                          map_smul' :=
                            (_ :
                              ∀ (r : R) (x : L),
                                AddHom.toFun ψ.toAddHom (r • x) =
                                  ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                      x,
                    AddHom.toFun
                      { toAddHom := ψ.toAddHom,
                          map_smul' :=
                            (_ :
                              ∀ (r : R) (x : L),
                                AddHom.toFun ψ.toAddHom (r • x) =
                                  ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                      y⁆) })
      ((fun χ => ↑χ) χ) =
    χ
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsLieAbelian L
χ : LieCharacter R L
x✝ : L
⊢ ↑((fun ψ =>
            {
              toLinearMap :=
                { toAddHom := ψ.toAddHom,
                  map_smul' :=
                    (_ :
                      ∀ (r : R) (x : L),
                        AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },
              map_lie' :=
                (_ :
                  ∀ {x y : L},
                    AddHom.toFun
                        { toAddHom := ψ.toAddHom,
                            map_smul' :=
                              (_ :
                                ∀ (r : R) (x : L),
                                  AddHom.toFun ψ.toAddHom (r • x) =
                                    ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                        ⁅x, y⁆ =
                      ⁅AddHom.toFun
                          { toAddHom := ψ.toAddHom,
                              map_smul' :=
                                (_ :
                                  ∀ (r : R) (x : L),
                                    AddHom.toFun ψ.toAddHom (r • x) =
                                      ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                          x,
                        AddHom.toFun
                          { toAddHom := ψ.toAddHom,
                              map_smul' :=
                                (_ :
                                  ∀ (r : R) (x : L),
                                    AddHom.toFun ψ.toAddHom (r • x) =
                                      ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                          y⁆) })
          ((fun χ => ↑χ) χ))
      x✝ =
    ↑χ x✝
[PROOFSTEP]
rfl
[GOAL]
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsLieAbelian L
ψ : Module.Dual R L
⊢ (fun χ => ↑χ)
      ((fun ψ =>
          {
            toLinearMap :=
              { toAddHom := ψ.toAddHom,
                map_smul' :=
                  (_ :
                    ∀ (r : R) (x : L),
                      AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },
            map_lie' :=
              (_ :
                ∀ {x y : L},
                  AddHom.toFun
                      { toAddHom := ψ.toAddHom,
                          map_smul' :=
                            (_ :
                              ∀ (r : R) (x : L),
                                AddHom.toFun ψ.toAddHom (r • x) =
                                  ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                      ⁅x, y⁆ =
                    ⁅AddHom.toFun
                        { toAddHom := ψ.toAddHom,
                            map_smul' :=
                              (_ :
                                ∀ (r : R) (x : L),
                                  AddHom.toFun ψ.toAddHom (r • x) =
                                    ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                        x,
                      AddHom.toFun
                        { toAddHom := ψ.toAddHom,
                            map_smul' :=
                              (_ :
                                ∀ (r : R) (x : L),
                                  AddHom.toFun ψ.toAddHom (r • x) =
                                    ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                        y⁆) })
        ψ) =
    ψ
[PROOFSTEP]
ext
[GOAL]
case h
R : Type u
L : Type v
inst✝³ : CommRing R
inst✝² : LieRing L
inst✝¹ : LieAlgebra R L
inst✝ : IsLieAbelian L
ψ : Module.Dual R L
x✝ : L
⊢ ↑((fun χ => ↑χ)
          ((fun ψ =>
              {
                toLinearMap :=
                  { toAddHom := ψ.toAddHom,
                    map_smul' :=
                      (_ :
                        ∀ (r : R) (x : L),
                          AddHom.toFun ψ.toAddHom (r • x) = ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) },
                map_lie' :=
                  (_ :
                    ∀ {x y : L},
                      AddHom.toFun
                          { toAddHom := ψ.toAddHom,
                              map_smul' :=
                                (_ :
                                  ∀ (r : R) (x : L),
                                    AddHom.toFun ψ.toAddHom (r • x) =
                                      ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                          ⁅x, y⁆ =
                        ⁅AddHom.toFun
                            { toAddHom := ψ.toAddHom,
                                map_smul' :=
                                  (_ :
                                    ∀ (r : R) (x : L),
                                      AddHom.toFun ψ.toAddHom (r • x) =
                                        ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                            x,
                          AddHom.toFun
                            { toAddHom := ψ.toAddHom,
                                map_smul' :=
                                  (_ :
                                    ∀ (r : R) (x : L),
                                      AddHom.toFun ψ.toAddHom (r • x) =
                                        ↑(RingHom.id R) r • AddHom.toFun ψ.toAddHom x) }.toAddHom
                            y⁆) })
            ψ))
      x✝ =
    ↑ψ x✝
[PROOFSTEP]
rfl


[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
⊢ |a * b| = |a| * |b|
[PROOFSTEP]
rw [abs_eq (mul_nonneg (abs_nonneg a) (abs_nonneg b))]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
cases' le_total a 0 with ha ha
[GOAL]
case inl
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : a ≤ 0
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
cases' le_total b 0 with hb hb
[GOAL]
case inr
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : 0 ≤ a
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
cases' le_total b 0 with hb hb
[GOAL]
case inl.inl
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : a ≤ 0
hb : b ≤ 0
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
simp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]
[GOAL]
case inl.inr
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : a ≤ 0
hb : 0 ≤ b
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
simp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]
[GOAL]
case inr.inl
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : 0 ≤ a
hb : b ≤ 0
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
simp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]
[GOAL]
case inr.inr
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b✝ c a b : α
ha : 0 ≤ a
hb : 0 ≤ b
⊢ a * b = |a| * |b| ∨ a * b = -(|a| * |b|)
[PROOFSTEP]
simp only [abs_of_nonpos, abs_of_nonneg, true_or_iff, or_true_iff, eq_self_iff_true, neg_mul, mul_neg, neg_neg, *]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ |a * a| = a * a
[PROOFSTEP]
rw [abs_mul, abs_mul_abs_self]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| = a ↔ 0 ≤ a
[PROOFSTEP]
simp [abs_eq_max_neg]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| = -a ↔ a ≤ 0
[PROOFSTEP]
simp [abs_eq_max_neg]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0
[PROOFSTEP]
by_cases h : 0 ≤ a
[GOAL]
case pos
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : 0 ≤ a
⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0
[PROOFSTEP]
left
[GOAL]
case pos.h
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : 0 ≤ a
⊢ |a| = a ∧ 0 ≤ a
[PROOFSTEP]
exact ⟨abs_eq_self.mpr h, h⟩
[GOAL]
case neg
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : ¬0 ≤ a
⊢ |a| = a ∧ 0 ≤ a ∨ |a| = -a ∧ a < 0
[PROOFSTEP]
right
[GOAL]
case neg.h
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : ¬0 ≤ a
⊢ |a| = -a ∧ a < 0
[PROOFSTEP]
push_neg at h
[GOAL]
case neg.h
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
h : a < 0
⊢ |a| = -a ∧ a < 0
[PROOFSTEP]
exact ⟨abs_eq_neg_self.mpr (le_of_lt h), h⟩
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ max a 0 + max (-a) 0 = |a|
[PROOFSTEP]
symm
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
⊢ |a| = max a 0 + max (-a) 0
[PROOFSTEP]
rcases le_total 0 a with (ha | ha)
[GOAL]
case inl
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
ha : 0 ≤ a
⊢ |a| = max a 0 + max (-a) 0
[PROOFSTEP]
simp [ha]
[GOAL]
case inr
α : Type u_1
inst✝ : LinearOrderedRing α
a✝ b c a : α
ha : a ≤ 0
⊢ |a| = max a 0 + max (-a) 0
[PROOFSTEP]
simp [ha]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| = |b| ↔ a * a = b * b
[PROOFSTEP]
rw [← abs_mul_abs_self, ← abs_mul_abs_self b]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| = |b| ↔ |a| * |a| = |b| * |b|
[PROOFSTEP]
exact (mul_self_inj (abs_nonneg a) (abs_nonneg b)).symm
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| < |b| ↔ a * a < b * b
[PROOFSTEP]
rw [← abs_mul_abs_self, ← abs_mul_abs_self b]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| < |b| ↔ |a| * |a| < |b| * |b|
[PROOFSTEP]
exact mul_self_lt_mul_self_iff (abs_nonneg a) (abs_nonneg b)
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| ≤ |b| ↔ a * a ≤ b * b
[PROOFSTEP]
rw [← abs_mul_abs_self, ← abs_mul_abs_self b]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| ≤ |b| ↔ |a| * |a| ≤ |b| * |b|
[PROOFSTEP]
exact mul_self_le_mul_self_iff (abs_nonneg a) (abs_nonneg b)
[GOAL]
α : Type u_1
inst✝ : LinearOrderedRing α
a b c : α
⊢ |a| ≤ 1 ↔ a * a ≤ 1
[PROOFSTEP]
simpa only [abs_one, one_mul] using @abs_le_iff_mul_self_le α _ a 1
[GOAL]
α : Type u_1
inst✝ : LinearOrderedCommRing α
a✝ b✝ c d a b : α
⊢ |a - b| * |a - b| = a * a + b * b - (1 + 1) * a * b
[PROOFSTEP]
rw [abs_mul_abs_self]
[GOAL]
α : Type u_1
inst✝ : LinearOrderedCommRing α
a✝ b✝ c d a b : α
⊢ (a - b) * (a - b) = a * a + b * b - (1 + 1) * a * b
[PROOFSTEP]
simp only [mul_add, add_comm, add_left_comm, mul_comm, sub_eq_add_neg, mul_one, mul_neg, neg_add_rev, neg_neg,
  add_assoc]
[GOAL]
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
⊢ |a| ∣ b ↔ a ∣ b
[PROOFSTEP]
cases' abs_choice a with h h
[GOAL]
case inl
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
h : |a| = a
⊢ |a| ∣ b ↔ a ∣ b
[PROOFSTEP]
simp only [h, neg_dvd]
[GOAL]
case inr
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
h : |a| = -a
⊢ |a| ∣ b ↔ a ∣ b
[PROOFSTEP]
simp only [h, neg_dvd]
[GOAL]
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
⊢ a ∣ |b| ↔ a ∣ b
[PROOFSTEP]
cases' abs_choice b with h h
[GOAL]
case inl
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
h : |b| = b
⊢ a ∣ |b| ↔ a ∣ b
[PROOFSTEP]
simp only [h, dvd_neg]
[GOAL]
case inr
α : Type u_1
inst✝¹ : Ring α
inst✝ : LinearOrder α
a✝ b✝ a b : α
h : |b| = -b
⊢ a ∣ |b| ↔ a ∣ b
[PROOFSTEP]
simp only [h, dvd_neg]


[GOAL]
p a b k : ℕ
hp : Prime p
hap : a < p
hbp : b < p
h : p ≤ a + b
⊢ p ∣ choose (a + b) a
[PROOFSTEP]
have h₁ : p ∣ (a + b)! := hp.dvd_factorial.2 h
[GOAL]
p a b k : ℕ
hp : Prime p
hap : a < p
hbp : b < p
h : p ≤ a + b
h₁ : p ∣ (a + b)!
⊢ p ∣ choose (a + b) a
[PROOFSTEP]
rw [← add_choose_mul_factorial_mul_factorial, ← choose_symm_add, hp.dvd_mul, hp.dvd_mul, hp.dvd_factorial,
  hp.dvd_factorial] at h₁
[GOAL]
p a b k : ℕ
hp : Prime p
hap : a < p
hbp : b < p
h : p ≤ a + b
h₁ : (p ∣ choose (a + b) a ∨ p ≤ a) ∨ p ≤ b
⊢ p ∣ choose (a + b) a
[PROOFSTEP]
exact (h₁.resolve_right hbp.not_le).resolve_right hap.not_le


[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
⊢ Nat.Prime p
[PROOFSTEP]
have h0 : p ≠ 0 := by
  rintro ⟨⟩
  exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
⊢ p ≠ 0
[PROOFSTEP]
rintro ⟨⟩
[GOAL]
case refl
a : ZMod 0
ha : a ^ (0 - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ 0 - 1 → a ^ ((0 - 1) / q) ≠ 1
⊢ False
[PROOFSTEP]
exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
⊢ Nat.Prime p
[PROOFSTEP]
have h1 : p ≠ 1 := by
  rintro ⟨⟩
  exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
⊢ p ≠ 1
[PROOFSTEP]
rintro ⟨⟩
[GOAL]
case refl
a : ZMod 1
ha : a ^ (1 - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ 1 - 1 → a ^ ((1 - 1) / q) ≠ 1
h0 : 1 ≠ 0
⊢ False
[PROOFSTEP]
exact hd 2 Nat.prime_two (dvd_zero _) (pow_zero _)
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
⊢ Nat.Prime p
[PROOFSTEP]
have hp1 : 1 < p := lt_of_le_of_ne h0.bot_lt h1.symm
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
⊢ Nat.Prime p
[PROOFSTEP]
have order_of_a : orderOf a = p - 1 :=
  by
  apply orderOf_eq_of_pow_and_pow_div_prime _ ha hd
  exact tsub_pos_of_lt hp1
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
⊢ orderOf a = p - 1
[PROOFSTEP]
apply orderOf_eq_of_pow_and_pow_div_prime _ ha hd
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
⊢ 0 < p - 1
[PROOFSTEP]
exact tsub_pos_of_lt hp1
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
⊢ Nat.Prime p
[PROOFSTEP]
haveI : NeZero p := ⟨h0⟩
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
⊢ Nat.Prime p
[PROOFSTEP]
rw [Nat.prime_iff_card_units]
  -- Prove cardinality of `Units` of `ZMod p` is both `≤ p-1` and `≥ p-1`
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
⊢ Fintype.card (ZMod p)ˣ = p - 1
[PROOFSTEP]
refine' le_antisymm (Nat.card_units_zmod_lt_sub_one hp1) _
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ
[PROOFSTEP]
have hp' : p - 2 + 1 = p - 1 := tsub_add_eq_add_tsub hp1
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
hp' : p - 2 + 1 = p - 1
⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ
[PROOFSTEP]
let a' : (ZMod p)ˣ := Units.mkOfMulEqOne a (a ^ (p - 2)) (by rw [← pow_succ, hp', ha])
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
hp' : p - 2 + 1 = p - 1
⊢ a * a ^ (p - 2) = 1
[PROOFSTEP]
rw [← pow_succ, hp', ha]
[GOAL]
p : ℕ
a : ZMod p
ha : a ^ (p - 1) = 1
hd : ∀ (q : ℕ), Nat.Prime q → q ∣ p - 1 → a ^ ((p - 1) / q) ≠ 1
h0 : p ≠ 0
h1 : p ≠ 1
hp1 : 1 < p
order_of_a : orderOf a = p - 1
this : NeZero p
hp' : p - 2 + 1 = p - 1
a' : (ZMod p)ˣ := Units.mkOfMulEqOne a (a ^ (p - 2)) (_ : a * a ^ (p - 2) = 1)
⊢ p - 1 ≤ Fintype.card (ZMod p)ˣ
[PROOFSTEP]
calc
  p - 1 = orderOf a := order_of_a.symm
  _ = orderOf a' := (orderOf_injective (Units.coeHom (ZMod p)) Units.ext a')
  _ ≤ Fintype.card (ZMod p)ˣ := orderOf_le_card_univ


[GOAL]
S : Set ℍ
⊢ S ∈ atImInfty ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S
[PROOFSTEP]
simp only [atImInfty_basis.mem_iff, true_and]
[GOAL]
S : Set ℍ
⊢ (∃ i, im ⁻¹' Set.Ici i ⊆ S) ↔ ∃ A, ∀ (z : ℍ), A ≤ im z → z ∈ S
[PROOFSTEP]
rfl
[GOAL]
f g : ℍ → ℂ
hf : IsBoundedAtImInfty f
hg : IsBoundedAtImInfty g
⊢ IsBoundedAtImInfty (f * g)
[PROOFSTEP]
simpa only [Pi.one_apply, mul_one, norm_eq_abs] using hf.mul hg
[GOAL]
f : ℍ → ℂ
⊢ IsBoundedAtImInfty f ↔ ∃ M A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ M
[PROOFSTEP]
simp [IsBoundedAtImInfty, BoundedAtFilter, Asymptotics.isBigO_iff, Filter.Eventually, atImInfty_mem]
[GOAL]
f : ℍ → ℂ
⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ (x : ℍ), x ∈ im ⁻¹' Set.Ici ia → f x ∈ Metric.closedBall 0 ib) ↔
    ∀ (ε : ℝ), 0 < ε → ∃ A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ ε
[PROOFSTEP]
simp only [true_and, mem_closedBall_zero_iff]
[GOAL]
f : ℍ → ℂ
⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, ∀ (x : ℍ), x ∈ im ⁻¹' Set.Ici ia → ‖f x‖ ≤ ib) ↔
    ∀ (ε : ℝ), 0 < ε → ∃ A, ∀ (z : ℍ), A ≤ im z → ↑Complex.abs (f z) ≤ ε
[PROOFSTEP]
rfl