-- Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Unique.lean
@[simp high]
lemma realContinuousMapOfNNReal_apply_comp_toReal (φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A)
    (f : C(X, ℝ≥0)) :
    φ.realContinuousMapOfNNReal ((ContinuousMap.mk toReal continuous_coe).comp f) = φ f

Proof state:
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ.realContinuousMapOfNNReal ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f) = φ f

Tactic:
simp only [realContinuousMapOfNNReal_apply]

Result:
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal -
      φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal =
    φ f

Proof state:
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal -
      φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal =
    φ f

Tactic:
convert_to φ f - φ 0 = φ f using 2

Result:
case h.e'_2.h.e'_5
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ f

case h.e'_2.h.e'_6
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ 0

X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ f - φ 0 = φ f

Proof state:
case h.e'_2.h.e'_5
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ f

case h.e'_2.h.e'_6
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ 0

Tactic:
all_goals
  congr
  ext x
  simp

Result:
no goals

Proof state:
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ f - φ 0 = φ f

Tactic:
rw [map_zero, sub_zero]

Result:
no goals

Proof state:
case h.e'_2.h.e'_6
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ 0

Tactic:
congr

Result:
case h.e'_2.h.e'_6.h.e_6.h
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = 0

Proof state:
case h.e'_2.h.e'_6.h.e_6.h.h.a
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
x : X
⊢ ↑((-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal x) = ↑(0 x)

Tactic:
simp

Result:
no goals

Proof state:
case h.e'_2.h.e'_6.h.e_6.h
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = 0

Tactic:
ext x

Result:
case h.e'_2.h.e'_6.h.e_6.h.h.a
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
x : X
⊢ ↑((-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal x) = ↑(0 x)

Proof state:
case h.e'_2.h.e'_5
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ f

case h.e'_2.h.e'_6
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ 0

X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ f - φ 0 = φ f

Tactic:
on_goal -1 => rw [map_zero, sub_zero]

Result:
case h.e'_2.h.e'_5
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ ({ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ f

case h.e'_2.h.e'_6
X : Type u_1
inst✝³ : TopologicalSpace X
A : Type u_2
inst✝² : Ring A
inst✝¹ : StarRing A
inst✝ : Algebra ℝ A
φ : C(X, ℝ≥0) →⋆ₐ[ℝ≥0] A
f : C(X, ℝ≥0)
⊢ φ (-{ toFun := toReal, continuous_toFun := continuous_coe }.comp f).toNNReal = φ 0