l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem arccos_pos {x : ℝ} : 0 < arccos x ↔ x < 1 := by 

Proof state:
x : ℝ
⊢ 0 < arccos x ↔ x < 1

Next tactic:
simp [arccos]
theorem cos_arccos {x : ℝ} (hx₁ : -1 ≤ x) (hx₂ : x ≤ 1) : cos (arccos x) = x := by
  

Proof state:
x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ cos (arccos x) = x

Next tactic:
rw [arccos, cos_pi_div_two_sub, sin_arcsin hx₁ hx₂]
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  

Proof state:
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ arccos (cos x) = x

Next tactic:
rw [arccos, ← sin_pi_div_two_sub, arcsin_sin]
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  rw [arccos, ← sin_pi_div_two_sub, arcsin_sin] <;> 

Proof state:
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ π / 2 - (π / 2 - x) = x

Next tactic:
simp [sub_eq_add_neg]
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  rw [arccos, ← sin_pi_div_two_sub, arcsin_sin] <;> 

Proof state:
case hx₁
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ -(π / 2) ≤ π / 2 - x

Next tactic:
simp [sub_eq_add_neg]
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  rw [arccos, ← sin_pi_div_two_sub, arcsin_sin] <;> 

Proof state:
case hx₂
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ π / 2 - x ≤ π / 2

Next tactic:
simp [sub_eq_add_neg]
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  rw [arccos, ← sin_pi_div_two_sub, arcsin_sin] <;> simp [sub_eq_add_neg] <;> 

Proof state:
case hx₁
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ x ≤ π

Next tactic:
linarith
theorem arccos_cos {x : ℝ} (hx₁ : 0 ≤ x) (hx₂ : x ≤ π) : arccos (cos x) = x := by
  rw [arccos, ← sin_pi_div_two_sub, arcsin_sin] <;> simp [sub_eq_add_neg] <;> 

Proof state:
case hx₂
x : ℝ
hx₁ : 0 ≤ x
hx₂ : x ≤ π
⊢ 0 ≤ x

Next tactic:
linarith
@[simp]
theorem arccos_zero : arccos 0 = π / 2 := by 

Proof state:
⊢ arccos 0 = π / 2

Next tactic:
simp [arccos]
@[simp]
theorem arccos_one : arccos 1 = 0 := by 

Proof state:
⊢ arccos 1 = 0

Next tactic:
simp [arccos]
@[simp]
theorem arccos_neg_one : arccos (-1) = π := by 

Proof state:
⊢ arccos (-1) = π

Next tactic:
simp [arccos, add_halves]
@[simp]
theorem arccos_eq_zero {x} : arccos x = 0 ↔ 1 ≤ x := by 

Proof state:
x : ℝ
⊢ arccos x = 0 ↔ 1 ≤ x

Next tactic:
simp [arccos, sub_eq_zero]
@[simp]
theorem arccos_eq_pi_div_two {x} : arccos x = π / 2 ↔ x = 0 := by 

Proof state:
x : ℝ
⊢ arccos x = π / 2 ↔ x = 0

Next tactic:
simp [arccos]
@[simp]
theorem arccos_eq_pi {x} : arccos x = π ↔ x ≤ -1 := by
  

Proof state:
x : ℝ
⊢ arccos x = π ↔ x ≤ -1

Next tactic:
rw [arccos, sub_eq_iff_eq_add, ← sub_eq_iff_eq_add', div_two_sub_self, neg_pi_div_two_eq_arcsin]
theorem arccos_neg (x : ℝ) : arccos (-x) = π - arccos x := by
  

Proof state:
x : ℝ
⊢ arccos (-x) = π - arccos x

Next tactic:
rw [← add_halves π, arccos, arcsin_neg, arccos, add_sub_assoc, sub_sub_self, sub_neg_eq_add]
theorem arccos_of_one_le {x : ℝ} (hx : 1 ≤ x) : arccos x = 0 := by
  

Proof state:
x : ℝ
hx : 1 ≤ x
⊢ arccos x = 0

Next tactic:
rw [arccos, arcsin_of_one_le hx, sub_self]
theorem arccos_of_le_neg_one {x : ℝ} (hx : x ≤ -1) : arccos x = π := by
  

Proof state:
x : ℝ
hx : x ≤ -1
⊢ arccos x = π

Next tactic:
rw [arccos, arcsin_of_le_neg_one hx, sub_neg_eq_add, add_halves']
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  

Proof state:
x : ℝ
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
by_cases hx₁ : -1 ≤ x
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; 

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = sqrt (1 - x ^ 2)
case neg x : ℝ hx₁ : ¬-1 ≤ x ⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
swap
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · 

Proof state:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
rw [not_le] at hx₁
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    

Proof state:
case neg
x : ℝ
hx₁ : x < -1
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    

Proof state:
case neg
x : ℝ
hx₁ : x < -1
⊢ 1 - x ^ 2 ≤ 0

Next tactic:
nlinarith
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
by_cases hx₂ : x ≤ 1
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  by_cases hx₂ : x ≤ 1; 

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = sqrt (1 - x ^ 2)
case neg x : ℝ hx₁ : -1 ≤ x hx₂ : ¬x ≤ 1 ⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
swap
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  by_cases hx₂ : x ≤ 1; swap
  · 

Proof state:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
rw [not_le] at hx₂
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  by_cases hx₂ : x ≤ 1; swap
  · rw [not_le] at hx₂
    

Proof state:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : 1 < x
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
rw [arccos_of_one_le hx₂.le, sin_zero, sqrt_eq_zero_of_nonpos]
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  by_cases hx₂ : x ≤ 1; swap
  · rw [not_le] at hx₂
    rw [arccos_of_one_le hx₂.le, sin_zero, sqrt_eq_zero_of_nonpos]
    

Proof state:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : 1 < x
⊢ 1 - x ^ 2 ≤ 0

Next tactic:
nlinarith
theorem sin_arccos (x : ℝ) : sin (arccos x) = sqrt (1 - x ^ 2) := by
  by_cases hx₁ : -1 ≤ x; swap
  · rw [not_le] at hx₁
    rw [arccos_of_le_neg_one hx₁.le, sin_pi, sqrt_eq_zero_of_nonpos]
    nlinarith
  by_cases hx₂ : x ≤ 1; swap
  · rw [not_le] at hx₂
    rw [arccos_of_one_le hx₂.le, sin_zero, sqrt_eq_zero_of_nonpos]
    nlinarith
  

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arccos x) = sqrt (1 - x ^ 2)

Next tactic:
rw [arccos_eq_pi_div_two_sub_arcsin, sin_pi_div_two_sub, cos_arcsin]
@[simp]
theorem arccos_le_pi_div_two {x} : arccos x ≤ π / 2 ↔ 0 ≤ x := by 

Proof state:
x : ℝ
⊢ arccos x ≤ π / 2 ↔ 0 ≤ x

Next tactic:
simp [arccos]
@[simp]
theorem arccos_lt_pi_div_two {x : ℝ} : arccos x < π / 2 ↔ 0 < x := by 

Proof state:
x : ℝ
⊢ arccos x < π / 2 ↔ 0 < x

Next tactic:
simp [arccos]
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  

Proof state:
x : ℝ
⊢ arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x

Next tactic:
rw [arccos, ← pi_div_four_le_arcsin]
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  rw [arccos, ← pi_div_four_le_arcsin]
  

Proof state:
x : ℝ
⊢ π / 2 - arcsin x ≤ π / 4 ↔ π / 4 ≤ arcsin x

Next tactic:
constructor
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  rw [arccos, ← pi_div_four_le_arcsin]
  constructor <;>
    · 

Proof state:
case mp
x : ℝ
⊢ π / 2 - arcsin x ≤ π / 4 → π / 4 ≤ arcsin x

Next tactic:
intro
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  rw [arccos, ← pi_div_four_le_arcsin]
  constructor <;>
    · intro
      

Proof state:
case mp
x : ℝ
a✝ : π / 2 - arcsin x ≤ π / 4
⊢ π / 4 ≤ arcsin x

Next tactic:
linarith
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  rw [arccos, ← pi_div_four_le_arcsin]
  constructor <;>
    · 

Proof state:
case mpr
x : ℝ
⊢ π / 4 ≤ arcsin x → π / 2 - arcsin x ≤ π / 4

Next tactic:
intro
@[simp]
theorem arccos_le_pi_div_four {x} : arccos x ≤ π / 4 ↔ sqrt 2 / 2 ≤ x := by
  rw [arccos, ← pi_div_four_le_arcsin]
  constructor <;>
    · intro
      

Proof state:
case mpr
x : ℝ
a✝ : π / 4 ≤ arcsin x
⊢ π / 2 - arcsin x ≤ π / 4

Next tactic:
linarith
theorem tan_arccos (x : ℝ) : tan (arccos x) = sqrt (1 - x ^ 2) / x := by
  

Proof state:
x : ℝ
⊢ tan (arccos x) = sqrt (1 - x ^ 2) / x

Next tactic:
rw [arccos, tan_pi_div_two_sub, tan_arcsin, inv_div]
theorem arccos_eq_arcsin {x : ℝ} (h : 0 ≤ x) : arccos x = arcsin (sqrt (1 - x ^ 2)) :=
  (arcsin_eq_of_sin_eq (sin_arccos _)
      ⟨(Left.neg_nonpos_iff.2 (div_nonneg pi_pos.le (by 

Proof state:
x : ℝ
h : 0 ≤ x
⊢ 0 ≤ 2

Next tactic:
norm_num
theorem arcsin_eq_arccos {x : ℝ} (h : 0 ≤ x) : arcsin x = arccos (sqrt (1 - x ^ 2)) := by
  

Proof state:
x : ℝ
h : 0 ≤ x
⊢ arcsin x = arccos (sqrt (1 - x ^ 2))

Next tactic:
rw [eq_comm, ← cos_arcsin]
theorem arcsin_eq_arccos {x : ℝ} (h : 0 ≤ x) : arcsin x = arccos (sqrt (1 - x ^ 2)) := by
  rw [eq_comm, ← cos_arcsin]
  

Proof state:
x : ℝ
h : 0 ≤ x
⊢ arccos (cos (arcsin x)) = arcsin x

Next tactic:
exact
    arccos_cos (arcsin_nonneg.2 h)
      ((arcsin_le_pi_div_two _).trans (div_le_self pi_pos.le one_le_two))
/-- The inclusion of locally-constant functions into continuous functions as a multiplicative
monoid hom. -/
@[to_additive (attr := simps)
"The inclusion of locally-constant functions into continuous functions as an additive monoid hom."]
def toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y) where
  toFun := (↑)
  map_one' := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
f : LocallyConstant X Y
inst✝¹ : Monoid Y
inst✝ : ContinuousMul Y
⊢ ↑1 = 1

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as a multiplicative
monoid hom. -/
@[to_additive (attr := simps)
"The inclusion of locally-constant functions into continuous functions as an additive monoid hom."]
def toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
f : LocallyConstant X Y
inst✝¹ : Monoid Y
inst✝ : ContinuousMul Y
a✝ : X
⊢ ↑1 a✝ = 1 a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as a multiplicative
monoid hom. -/
@[to_additive (attr := simps)
"The inclusion of locally-constant functions into continuous functions as an additive monoid hom."]
def toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
f : LocallyConstant X Y
inst✝¹ : Monoid Y
inst✝ : ContinuousMul Y
x y : LocallyConstant X Y
⊢ OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
      OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as a multiplicative
monoid hom. -/
@[to_additive (attr := simps)
"The inclusion of locally-constant functions into continuous functions as an additive monoid hom."]
def toContinuousMapMonoidHom [Monoid Y] [ContinuousMul Y] : LocallyConstant X Y →* C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
f : LocallyConstant X Y
inst✝¹ : Monoid Y
inst✝ : ContinuousMul Y
x y : LocallyConstant X Y
a✝ : X
⊢ (OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y)) a✝ =
    (OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
        OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y)
      a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as a linear map. -/
@[simps]
def toContinuousMapLinearMap (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]
    [ContinuousAdd Y] [ContinuousConstSMul R Y] : LocallyConstant X Y →ₗ[R] C(X, Y) where
  toFun := (↑)
  map_add' x y := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid Y
inst✝² : Module R Y
inst✝¹ : ContinuousAdd Y
inst✝ : ContinuousConstSMul R Y
x y : LocallyConstant X Y
⊢ ↑(x + y) = ↑x + ↑y

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as a linear map. -/
@[simps]
def toContinuousMapLinearMap (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]
    [ContinuousAdd Y] [ContinuousConstSMul R Y] : LocallyConstant X Y →ₗ[R] C(X, Y) where
  toFun := (↑)
  map_add' x y := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid Y
inst✝² : Module R Y
inst✝¹ : ContinuousAdd Y
inst✝ : ContinuousConstSMul R Y
x y : LocallyConstant X Y
a✝ : X
⊢ ↑(x + y) a✝ = (↑x + ↑y) a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as a linear map. -/
@[simps]
def toContinuousMapLinearMap (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]
    [ContinuousAdd Y] [ContinuousConstSMul R Y] : LocallyConstant X Y →ₗ[R] C(X, Y) where
  toFun := (↑)
  map_add' x y := by
    ext
    simp
  map_smul' x y := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid Y
inst✝² : Module R Y
inst✝¹ : ContinuousAdd Y
inst✝ : ContinuousConstSMul R Y
x : R
y : LocallyConstant X Y
⊢ AddHom.toFun { toFun := toContinuousMap, map_add' := (_ : ∀ (x y : LocallyConstant X Y), ↑(x + y) = ↑x + ↑y) }
      (x • y) =
    (RingHom.id R) x •
      AddHom.toFun { toFun := toContinuousMap, map_add' := (_ : ∀ (x y : LocallyConstant X Y), ↑(x + y) = ↑x + ↑y) } y

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as a linear map. -/
@[simps]
def toContinuousMapLinearMap (R : Type*) [Semiring R] [AddCommMonoid Y] [Module R Y]
    [ContinuousAdd Y] [ContinuousConstSMul R Y] : LocallyConstant X Y →ₗ[R] C(X, Y) where
  toFun := (↑)
  map_add' x y := by
    ext
    simp
  map_smul' x y := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝⁶ : TopologicalSpace X
inst✝⁵ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid Y
inst✝² : Module R Y
inst✝¹ : ContinuousAdd Y
inst✝ : ContinuousConstSMul R Y
x : R
y : LocallyConstant X Y
a✝ : X
⊢ (AddHom.toFun { toFun := toContinuousMap, map_add' := (_ : ∀ (x y : LocallyConstant X Y), ↑(x + y) = ↑x + ↑y) }
        (x • y))
      a✝ =
    ((RingHom.id R) x •
        AddHom.toFun { toFun := toContinuousMap, map_add' := (_ : ∀ (x y : LocallyConstant X Y), ↑(x + y) = ↑x + ↑y) }
          y)
      a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
⊢ ↑1 = 1

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
a✝ : X
⊢ ↑1 a✝ = 1 a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
x y : LocallyConstant X Y
⊢ OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
      OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
x y : LocallyConstant X Y
a✝ : X
⊢ (OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y)) a✝ =
    (OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
        OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y)
      a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    ext
    simp
  map_zero' := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) },
          map_mul' :=
            (_ :
              ∀ (x y : LocallyConstant X Y),
                OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
                  OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
                    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y) })
      0 =
    0

Next tactic:
ext
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    ext
    simp
  map_zero' := by
    ext
    

Proof state:
case h
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
a✝ : X
⊢ (OneHom.toFun
        (↑{ toOneHom := { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) },
            map_mul' :=
              (_ :
                ∀ (x y : LocallyConstant X Y),
                  OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
                    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
                      OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y) })
        0)
      a✝ =
    0 a✝

Next tactic:
simp
/-- The inclusion of locally-constant functions into continuous functions as an algebra map. -/
@[simps]
def toContinuousMapAlgHom (R : Type*) [CommSemiring R] [Semiring Y] [Algebra R Y]
    [TopologicalSemiring Y] : LocallyConstant X Y →ₐ[R] C(X, Y) where
  toFun := (↑)
  map_one' := by
    ext
    simp
  map_mul' x y := by
    ext
    simp
  map_zero' := by
    ext
    simp
  map_add' x y := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
f : LocallyConstant X Y
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : Semiring Y
inst✝¹ : Algebra R Y
inst✝ : TopologicalSemiring Y
x y : LocallyConstant X Y
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) },
          map_mul' :=
            (_ :
              ∀ (x y : LocallyConstant X Y),
                OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
                  OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
                    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y) })
      (x + y) =
    OneHom.toFun
        (↑{ toOneHom := { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) },
            map_mul' :=
              (_ :
                ∀ (x y : LocallyConstant X Y),
                  OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
                    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
                      OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y) })
        x +
      OneHom.toFun
        (↑{ toOneHom := { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) },
            map_mul' :=
              (_ :
                ∀ (x y : LocallyConstant X Y),
                  OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } (x * y) =
                    OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } x *
                      OneHom.toFun { toFun := toContinuousMap, map_one' := (_ : ↑1 = 1) } y) })
        y

Next tactic:
ext