-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean
theorem tan_arcsin (x : ℝ) : tan (arcsin x) = x / √(1 - x ^ 2)

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

Tactic:
have h : √(1 - x ^ 2) = 0 := sqrt_eq_zero_of_nonpos (by nlinarith)

Result:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
by_cases hx₂ : x ≤ 1

Result:
case pos
x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

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

Tactic:
rw [sin_arcsin hx₁ hx₂]

Result:
no goals

Proof state:
case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

case neg
x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
swap

Result:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Proof state:
x : ℝ
⊢ tan (arcsin x) = x / √(1 - x ^ 2)

Tactic:
rw [tan_eq_sin_div_cos, cos_arcsin]

Result:
x : ℝ
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Proof state:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
rw [h]

Result:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / 0 = x / 0

Proof state:
case neg
x : ℝ
hx₁ : ¬-1 ≤ x
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / 0 = x / 0

Tactic:
simp

Result:
no goals

Proof state:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
rw [h]

Result:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / 0 = x / 0

Proof state:
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ 1 - x ^ 2 ≤ 0

Tactic:
nlinarith

Result:
no goals

Proof state:
x : ℝ
hx₁ : ¬-1 ≤ x
⊢ 1 - x ^ 2 ≤ 0

Tactic:
nlinarith

Result:
no goals

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

Tactic:
have h : √(1 - x ^ 2) = 0 := sqrt_eq_zero_of_nonpos (by nlinarith)

Result:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Proof state:
x : ℝ
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
by_cases hx₁ : -1 ≤ x

Result:
case pos
x : ℝ
hx₁ : -1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

case neg
x : ℝ
hx₁ : ¬-1 ≤ x
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Proof state:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
h : √(1 - x ^ 2) = 0
⊢ sin (arcsin x) / 0 = x / 0

Tactic:
simp

Result:
no goals

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

case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

Tactic:
swap

Result:
case neg
x : ℝ
hx₁ : -1 ≤ x
hx₂ : ¬x ≤ 1
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)

case pos
x : ℝ
hx₁ : -1 ≤ x
hx₂ : x ≤ 1
⊢ sin (arcsin x) / √(1 - x ^ 2) = x / √(1 - x ^ 2)