log-exp
Case set df65d778fc5c
demo-eq-log-01
Given
\(x \in \mathbb{R},\quad x > 0\)
Claim
\(\displaystyle \log\left(e^{x}\right) = x\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.
Lean proof: included
(case demo-eq-log-01 (category log-exp) (note "positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.") (var x real) (assume (positive x)) (ask (= (log (exp x)) x)) (expect true) (lean-proof "have hx : x.im = 0 := hd0; exact ⟨Complex.exp_ne_zero x, Complex.log_exp (by rw [hx]; linarith [Real.pi_pos]) (by rw [hx]; linarith [Real.pi_pos])⟩"))
demo-eq-pow-01
Given
\(n \in \mathbb{Z}\)
Claim
\(\displaystyle \left(-1\right)^{2 \, n} = 1\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
(case demo-eq-pow-01 (category log-exp) (var n integer) (ask (= (pow -1 (* 2 n)) 1)) (expect true))
Case set 03f5149718d0
demo-eq-log-01
Given
\(x \in \mathbb{R},\quad x > 0\)
Claim
\(\displaystyle \log\left(e^{x}\right) = x\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.
Lean proof: included
(case demo-eq-log-01 (category log-exp) (note "positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.") (var x real) (assume (positive x)) (ask (= (log (exp x)) x)) (expect true) (lean-proof "have hx : x.im = 0 := hd0; exact ⟨Complex.exp_ne_zero x, Complex.log_exp (by rw [hx]; linarith [Real.pi_pos]) (by rw [hx]; linarith [Real.pi_pos])⟩"))
demo-eq-pow-01
Given
\(n \in \mathbb{Z}\)
Claim
\(\displaystyle \left(-1\right)^{2 \, n} = 1\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
(case demo-eq-pow-01 (category log-exp) (var n integer) (ask (= (pow -1 (* 2 n)) 1)) (expect true))
Case set d7af4def9aaa
demo-eq-log-01
Given
\(x \in \mathbb{R},\quad x > 0\)
Claim
\(\displaystyle \log\left(e^{x}\right) = x\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.
Lean proof: included
(case demo-eq-log-01 (category log-exp) (note "positive x: for very negative x the numeric checker snaps exp(x) to 0, where log is undefined.") (var x real) (assume (positive x)) (ask (= (log (exp x)) x)) (expect true) (lean-proof "have hx : x.im = 0 := hd0; exact ⟨Complex.exp_ne_zero x, Complex.log_exp (by rw [hx]; linarith [Real.pi_pos]) (by rw [hx]; linarith [Real.pi_pos])⟩"))
demo-eq-pow-01
Given
\(n \in \mathbb{Z}\)
Claim
\(\displaystyle \left(-1\right)^{2 \, n} = 1\)
Expected
true equal at every admissible point
the two sides are equal at every admissible point
(case demo-eq-pow-01 (category log-exp) (var n integer) (ask (= (pow -1 (* 2 n)) 1)) (expect true))