state
stringlengths
0
159k
srcUpToTactic
stringlengths
387
167k
nextTactic
stringlengths
3
9k
declUpToTactic
stringlengths
22
11.5k
declId
stringlengths
38
95
decl
stringlengths
16
1.89k
file_tag
stringlengths
17
73
x y : ℂ ⊢ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by
simp [(by norm_num : (2 : ℂ) ≠ 0)]
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ 2 ≠ 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by
norm_num
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 ↔ (∃ k, y = 2 * ↑k * ↑π + x) ∨ ∃ k, y = 2 * ↑k * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by
apply or_congr
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁ x y : ℂ ⊢ sin ((x - y) / 2) = 0 ↔ ∃ k, y = 2 * ↑k * ↑π + x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;>
field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)]
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ -2 ≠ 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by
norm_num
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₂ x y : ℂ ⊢ sin ((x + y) / 2) = 0 ↔ ∃ k, y = 2 * ↑k * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;>
field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)]
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ -2 ≠ 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by
norm_num
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁ x y : ℂ ⊢ (∃ k, x = ↑k * ↑π * 2 + y) ↔ ∃ k, y = ↑k * ↑π * 2 + x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)]
constructor
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁.mp x y : ℂ ⊢ (∃ k, x = ↑k * ↑π * 2 + y) → ∃ k, y = ↑k * ↑π * 2 + x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> ·
rintro ⟨k, rfl⟩
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁.mp.intro y : ℂ k : ℤ ⊢ ∃ k_1, y = ↑k_1 * ↑π * 2 + (↑k * ↑π * 2 + y)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩;
use -k
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩;
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h y : ℂ k : ℤ ⊢ y = ↑(-k) * ↑π * 2 + (↑k * ↑π * 2 + y)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k;
simp
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k;
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁.mpr x y : ℂ ⊢ (∃ k, y = ↑k * ↑π * 2 + x) → ∃ k, x = ↑k * ↑π * 2 + y
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> ·
rintro ⟨k, rfl⟩
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h₁.mpr.intro x : ℂ k : ℤ ⊢ ∃ k_1, x = ↑k_1 * ↑π * 2 + (↑k * ↑π * 2 + x)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩;
use -k
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩;
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h x : ℂ k : ℤ ⊢ x = ↑(-k) * ↑π * 2 + (↑k * ↑π * 2 + x)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k;
simp
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k;
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.80_0.wRglntQQQHH0e1R
theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ sin x = sin y ↔ ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by
simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add]
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ ⊢ (∃ k, y = 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 ∨ y = 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2) ↔ ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add]
refine' exists_congr fun k => or_congr _ _
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_1 x y : ℂ k : ℤ ⊢ y = 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 ↔ y = 2 * ↑k * ↑π + x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;>
refine' Eq.congr rfl _
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_2 x y : ℂ k : ℤ ⊢ y = 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2 ↔ y = (2 * ↑k + 1) * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;>
refine' Eq.congr rfl _
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_1 x y : ℂ k : ℤ ⊢ 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 = 2 * ↑k * ↑π + x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;>
field_simp
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_2 x y : ℂ k : ℤ ⊢ 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2 = (2 * ↑k + 1) * ↑π - x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;>
field_simp
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_1 x y : ℂ k : ℤ ⊢ 2 * ↑k * ↑π * 2 + (x * 2 - ↑π) + ↑π = (2 * ↑k * ↑π + x) * 2
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;>
ring
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case refine'_2 x y : ℂ k : ℤ ⊢ 2 * ↑k * ↑π * 2 - (x * 2 - ↑π) + ↑π = ((2 * ↑k + 1) * ↑π - x) * 2
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;>
ring
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;>
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.94_0.wRglntQQQHH0e1R
theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ h : ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2) ∨ (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y = (2 * ↑l + 1) * ↑π / 2 ⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by
rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩)
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inl.intro x y : ℂ h1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2 h2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2 ⊢ tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) ·
rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div]
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inl.intro x y : ℂ h1 : ∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2 h2 : ∀ (l : ℤ), y ≠ (2 * ↑l + 1) * ↑π / 2 ⊢ (sin x * cos y / (cos x * cos y) + cos x * sin y / (cos x * cos y)) / (cos x * cos y / (cos x * cos y) - sin x * sin y / (cos x * cos y)) = (tan x + tan y) / (1 - tan x * tan y)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div]
simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)]
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inr.intro.intro.intro k l : ℤ ⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) = (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) / (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] ·
haveI t := tan_int_mul_pi_div_two
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inr.intro.intro.intro k l : ℤ t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0 ⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) = (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) / (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two
obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1))
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inr.intro.intro.intro k l : ℤ t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0 hx : tan (↑(2 * k + 1) * ↑π / 2) = 0 hy : tan (↑(2 * l + 1) * ↑π / 2) = 0 hxy : tan (↑(2 * k + 1 + (2 * l + 1)) * ↑π / 2) = 0 ⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) = (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) / (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1))
simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1))
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case inr.intro.intro.intro k l : ℤ t : ∀ (n : ℤ), tan (↑n * ↑π / 2) = 0 hx : tan ((2 * ↑k + 1) * ↑π / 2) = 0 hy : tan ((2 * ↑l + 1) * ↑π / 2) = 0 hxy : tan ((2 * ↑k + 1 + (2 * ↑l + 1)) * ↑π / 2) = 0 ⊢ tan ((2 * ↑k + 1) * ↑π / 2 + (2 * ↑l + 1) * ↑π / 2) = (tan ((2 * ↑k + 1) * ↑π / 2) + tan ((2 * ↑l + 1) * ↑π / 2)) / (1 - tan ((2 * ↑k + 1) * ↑π / 2) * tan ((2 * ↑l + 1) * ↑π / 2))
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy
rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy]
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.100_0.wRglntQQQHH0e1R
theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z : ℂ ⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by
by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.124_0.wRglntQQQHH0e1R
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case pos z : ℂ h : ∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2 ⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 ·
rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)]
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.124_0.wRglntQQQHH0e1R
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case neg z : ℂ h : ¬∀ (k : ℤ), z ≠ (2 * ↑k + 1) * ↑π / 2 ⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] ·
rw [not_forall_not] at h
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] ·
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.124_0.wRglntQQQHH0e1R
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case neg z : ℂ h : ∃ x, z = (2 * ↑x + 1) * ↑π / 2 ⊢ tan (2 * z) = 2 * tan z / (1 - tan z ^ 2)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h
rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)]
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.124_0.wRglntQQQHH0e1R
theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x y : ℂ h : ((∀ (k : ℤ), x ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), y * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨ (∃ k, x = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, y * I = (2 * ↑l + 1) * ↑π / 2 ⊢ tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by
rw [tan_add h, tan_mul_I, mul_assoc]
theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.131_0.wRglntQQQHH0e1R
theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z : ℂ h : ((∀ (k : ℤ), ↑z.re ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), ↑z.im * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨ (∃ k, ↑z.re = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, ↑z.im * I = (2 * ↑l + 1) * ↑π / 2 ⊢ tan z = (tan ↑z.re + tanh ↑z.im * I) / (1 - tan ↑z.re * tanh ↑z.im * I)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by
convert tan_add_mul_I h
theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.140_0.wRglntQQQHH0e1R
theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h.e'_2.h.e'_1 z : ℂ h : ((∀ (k : ℤ), ↑z.re ≠ (2 * ↑k + 1) * ↑π / 2) ∧ ∀ (l : ℤ), ↑z.im * I ≠ (2 * ↑l + 1) * ↑π / 2) ∨ (∃ k, ↑z.re = (2 * ↑k + 1) * ↑π / 2) ∧ ∃ l, ↑z.im * I = (2 * ↑l + 1) * ↑π / 2 ⊢ z = ↑z.re + ↑z.im * I
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h;
exact (re_add_im z).symm
theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h;
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.140_0.wRglntQQQHH0e1R
theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z w : ℂ ⊢ cos z = w ↔ cexp (z * I) ^ 2 - 2 * w * cexp (z * I) + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by
rw [← sub_eq_zero]
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.161_0.wRglntQQQHH0e1R
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z w : ℂ ⊢ cos z - w = 0 ↔ cexp (z * I) ^ 2 - 2 * w * cexp (z * I) + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero]
field_simp [cos, exp_neg, exp_ne_zero]
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.161_0.wRglntQQQHH0e1R
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z w : ℂ ⊢ cexp (z * I) * cexp (z * I) + 1 - cexp (z * I) * 2 * w = 0 ↔ cexp (z * I) ^ 2 - 2 * w * cexp (z * I) + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero]
refine' Eq.congr _ rfl
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.161_0.wRglntQQQHH0e1R
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
z w : ℂ ⊢ cexp (z * I) * cexp (z * I) + 1 - cexp (z * I) * 2 * w = cexp (z * I) ^ 2 - 2 * w * cexp (z * I) + 1
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl
ring
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.161_0.wRglntQQQHH0e1R
theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
⊢ Function.Surjective cos
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by
intro x
theorem cos_surjective : Function.Surjective cos := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℂ ⊢ ∃ a, cos a = x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x
obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw
theorem cos_surjective : Function.Surjective cos := by intro x
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℂ ⊢ ∃ w, ∃ (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by
rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro x w : ℂ hw : 1 * w * w + ?m.61281 * w + ?m.61282 = 0 ⊢ ∃ w, ∃ (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩
refine' ⟨w, _, hw⟩
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro x w : ℂ hw : 1 * w * w + -2 * x * w + 1 = 0 ⊢ w ≠ 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩
rintro rfl
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro x : ℂ hw : 1 * 0 * 0 + -2 * x * 0 + 1 = 0 ⊢ False
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl
simp only [zero_add, one_ne_zero, mul_zero] at hw
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro.intro x w : ℂ w₀ : w ≠ 0 hw : 1 * w * w + -2 * x * w + 1 = 0 ⊢ ∃ a, cos a = x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw
refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro.intro x w : ℂ w₀ : w ≠ 0 hw : 1 * w * w + -2 * x * w + 1 = 0 ⊢ cexp (log w / I * I) ^ 2 - 2 * x * cexp (log w / I * I) + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩
rw [div_mul_cancel _ I_ne_zero, exp_log w₀]
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro.intro x w : ℂ w₀ : w ≠ 0 hw : 1 * w * w + -2 * x * w + 1 = 0 ⊢ w ^ 2 - 2 * x * w + 1 = 0
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀]
convert hw using 1
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case h.e'_2 x w : ℂ w₀ : w ≠ 0 hw : 1 * w * w + -2 * x * w + 1 = 0 ⊢ w ^ 2 - 2 * x * w + 1 = 1 * w * w + -2 * x * w + 1
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1
ring
theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.169_0.wRglntQQQHH0e1R
theorem cos_surjective : Function.Surjective cos
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
⊢ Function.Surjective sin
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by
intro x
theorem sin_surjective : Function.Surjective sin := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.189_0.wRglntQQQHH0e1R
theorem sin_surjective : Function.Surjective sin
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℂ ⊢ ∃ a, sin a = x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x
rcases cos_surjective x with ⟨z, rfl⟩
theorem sin_surjective : Function.Surjective sin := by intro x
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.189_0.wRglntQQQHH0e1R
theorem sin_surjective : Function.Surjective sin
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
case intro z : ℂ ⊢ ∃ a, sin a = cos z
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩
exact ⟨z + π / 2, sin_add_pi_div_two z⟩
theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.189_0.wRglntQQQHH0e1R
theorem sin_surjective : Function.Surjective sin
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
θ : ℝ ⊢ cos θ ≠ 0 ↔ ∀ (k : ℤ), θ ≠ (2 * ↑k + 1) * π / 2
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by
rw [← not_exists, not_iff_not, cos_eq_zero_iff]
theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.210_0.wRglntQQQHH0e1R
theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 < x hx' : x < 1 ⊢ x < sin (π / 2 * x)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by
simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx
theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.223_0.wRglntQQQHH0e1R
theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 ≤ x hx' : x ≤ 1 ⊢ x ≤ sin (π / 2 * x)
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by
simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx
theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.229_0.wRglntQQQHH0e1R
theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x)
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 < x hx' : x < π / 2 ⊢ 2 / π * x < sin x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by
rw [← inv_div]
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.235_0.wRglntQQQHH0e1R
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 < x hx' : x < π / 2 ⊢ (π / 2)⁻¹ * x < sin x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div]
simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos])
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.235_0.wRglntQQQHH0e1R
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 < x hx' : x < π / 2 ⊢ (π / 2)⁻¹ * x < 1
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by
rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos]
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.235_0.wRglntQQQHH0e1R
theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 ≤ x hx' : x ≤ π / 2 ⊢ 2 / π * x ≤ sin x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos]) #align real.mul_lt_sin Real.mul_lt_sin /-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by
rw [← inv_div]
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.241_0.wRglntQQQHH0e1R
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 ≤ x hx' : x ≤ π / 2 ⊢ (π / 2)⁻¹ * x ≤ sin x
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos]) #align real.mul_lt_sin Real.mul_lt_sin /-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by rw [← inv_div]
simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @le_sin_mul ((π / 2)⁻¹ * x) (mul_nonneg (inv_nonneg.2 pi_div_two_pos.le) hx) (by rwa [← div_eq_inv_mul, div_le_one pi_div_two_pos])
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by rw [← inv_div]
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.241_0.wRglntQQQHH0e1R
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
x : ℝ hx : 0 ≤ x hx' : x ≤ π / 2 ⊢ (π / 2)⁻¹ * x ≤ 1
/- Copyright (c) 2018 Chris Hughes. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Hughes, Abhimanyu Pallavi Sudhir, Jean Lo, Calle Sönne, Benjamin Davidson -/ import Mathlib.Algebra.QuadraticDiscriminant import Mathlib.Analysis.Convex.SpecificFunctions.Deriv #align_import analysis.special_functions.trigonometric.complex from "leanprover-community/mathlib"@"8f9fea08977f7e450770933ee6abb20733b47c92" /-! # Complex trigonometric functions Basic facts and derivatives for the complex trigonometric functions. Several facts about the real trigonometric functions have the proofs deferred here, rather than `Analysis.SpecialFunctions.Trigonometric.Basic`, as they are most easily proved by appealing to the corresponding fact for complex trigonometric functions, or require additional imports which are not available in that file. -/ noncomputable section namespace Complex open Set Filter open scoped Real theorem cos_eq_zero_iff {θ : ℂ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := by have h : (exp (θ * I) + exp (-θ * I)) / 2 = 0 ↔ exp (2 * θ * I) = -1 := by rw [@div_eq_iff _ _ (exp (θ * I) + exp (-θ * I)) 2 0 two_ne_zero, zero_mul, add_eq_zero_iff_eq_neg, neg_eq_neg_one_mul, ← div_eq_iff (exp_ne_zero _), ← exp_sub] congr 3; ring_nf rw [cos, h, ← exp_pi_mul_I, exp_eq_exp_iff_exists_int, mul_right_comm] refine' exists_congr fun x => _ refine' (iff_of_eq <| congr_arg _ _).trans (mul_right_inj' <| mul_ne_zero two_ne_zero I_ne_zero) field_simp; ring #align complex.cos_eq_zero_iff Complex.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℂ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align complex.cos_ne_zero_iff Complex.cos_ne_zero_iff theorem sin_eq_zero_iff {θ : ℂ} : sin θ = 0 ↔ ∃ k : ℤ, θ = k * π := by rw [← Complex.cos_sub_pi_div_two, cos_eq_zero_iff] constructor · rintro ⟨k, hk⟩ use k + 1 field_simp [eq_add_of_sub_eq hk] ring · rintro ⟨k, rfl⟩ use k - 1 field_simp ring #align complex.sin_eq_zero_iff Complex.sin_eq_zero_iff theorem sin_ne_zero_iff {θ : ℂ} : sin θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π := by rw [← not_exists, not_iff_not, sin_eq_zero_iff] #align complex.sin_ne_zero_iff Complex.sin_ne_zero_iff theorem tan_eq_zero_iff {θ : ℂ} : tan θ = 0 ↔ ∃ k : ℤ, θ = k * π / 2 := by have h := (sin_two_mul θ).symm rw [mul_assoc] at h rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← zero_mul (1 / 2 : ℂ), mul_one_div, CancelDenoms.cancel_factors_eq_div h two_ne_zero, mul_comm] simpa only [zero_div, zero_mul, Ne.def, not_false_iff, field_simps] using sin_eq_zero_iff #align complex.tan_eq_zero_iff Complex.tan_eq_zero_iff theorem tan_ne_zero_iff {θ : ℂ} : tan θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ k * π / 2 := by rw [← not_exists, not_iff_not, tan_eq_zero_iff] #align complex.tan_ne_zero_iff Complex.tan_ne_zero_iff theorem tan_int_mul_pi_div_two (n : ℤ) : tan (n * π / 2) = 0 := tan_eq_zero_iff.mpr (by use n) #align complex.tan_int_mul_pi_div_two Complex.tan_int_mul_pi_div_two theorem cos_eq_cos_iff {x y : ℂ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := calc cos x = cos y ↔ cos x - cos y = 0 := sub_eq_zero.symm _ ↔ -2 * sin ((x + y) / 2) * sin ((x - y) / 2) = 0 := by rw [cos_sub_cos] _ ↔ sin ((x + y) / 2) = 0 ∨ sin ((x - y) / 2) = 0 := by simp [(by norm_num : (2 : ℂ) ≠ 0)] _ ↔ sin ((x - y) / 2) = 0 ∨ sin ((x + y) / 2) = 0 := or_comm _ ↔ (∃ k : ℤ, y = 2 * k * π + x) ∨ ∃ k : ℤ, y = 2 * k * π - x := by apply or_congr <;> field_simp [sin_eq_zero_iff, (by norm_num : -(2 : ℂ) ≠ 0), eq_sub_iff_add_eq', sub_eq_iff_eq_add, mul_comm (2 : ℂ), mul_right_comm _ (2 : ℂ)] constructor <;> · rintro ⟨k, rfl⟩; use -k; simp _ ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := exists_or.symm #align complex.cos_eq_cos_iff Complex.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℂ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := by simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add] refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring #align complex.sin_eq_sin_iff Complex.sin_eq_sin_iff theorem tan_add {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y = (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := by rcases h with (⟨h1, h2⟩ | ⟨⟨k, rfl⟩, ⟨l, rfl⟩⟩) · rw [tan, sin_add, cos_add, ← div_div_div_cancel_right (sin x * cos y + cos x * sin y) (mul_ne_zero (cos_ne_zero_iff.mpr h1) (cos_ne_zero_iff.mpr h2)), add_div, sub_div] simp only [← div_mul_div_comm, tan, mul_one, one_mul, div_self (cos_ne_zero_iff.mpr h1), div_self (cos_ne_zero_iff.mpr h2)] · haveI t := tan_int_mul_pi_div_two obtain ⟨hx, hy, hxy⟩ := t (2 * k + 1), t (2 * l + 1), t (2 * k + 1 + (2 * l + 1)) simp only [Int.cast_add, Int.cast_two, Int.cast_mul, Int.cast_one, hx, hy] at hx hy hxy rw [hx, hy, add_zero, zero_div, mul_div_assoc, mul_div_assoc, ← add_mul (2 * (k : ℂ) + 1) (2 * l + 1) (π / 2), ← mul_div_assoc, hxy] #align complex.tan_add Complex.tan_add theorem tan_add' {x y : ℂ} (h : (∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y ≠ (2 * l + 1) * π / 2) : tan (x + y) = (tan x + tan y) / (1 - tan x * tan y) := tan_add (Or.inl h) #align complex.tan_add' Complex.tan_add' theorem tan_two_mul {z : ℂ} : tan (2 * z) = (2 : ℂ) * tan z / ((1 : ℂ) - tan z ^ 2) := by by_cases h : ∀ k : ℤ, z ≠ (2 * k + 1) * π / 2 · rw [two_mul, two_mul, sq, tan_add (Or.inl ⟨h, h⟩)] · rw [not_forall_not] at h rw [two_mul, two_mul, sq, tan_add (Or.inr ⟨h, h⟩)] #align complex.tan_two_mul Complex.tan_two_mul theorem tan_add_mul_I {x y : ℂ} (h : ((∀ k : ℤ, x ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, y * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, x = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, y * I = (2 * l + 1) * π / 2) : tan (x + y * I) = (tan x + tanh y * I) / (1 - tan x * tanh y * I) := by rw [tan_add h, tan_mul_I, mul_assoc] set_option linter.uppercaseLean3 false in #align complex.tan_add_mul_I Complex.tan_add_mul_I theorem tan_eq {z : ℂ} (h : ((∀ k : ℤ, (z.re : ℂ) ≠ (2 * k + 1) * π / 2) ∧ ∀ l : ℤ, (z.im : ℂ) * I ≠ (2 * l + 1) * π / 2) ∨ (∃ k : ℤ, (z.re : ℂ) = (2 * k + 1) * π / 2) ∧ ∃ l : ℤ, (z.im : ℂ) * I = (2 * l + 1) * π / 2) : tan z = (tan z.re + tanh z.im * I) / (1 - tan z.re * tanh z.im * I) := by convert tan_add_mul_I h; exact (re_add_im z).symm #align complex.tan_eq Complex.tan_eq open scoped Topology theorem continuousOn_tan : ContinuousOn tan {x | cos x ≠ 0} := continuousOn_sin.div continuousOn_cos fun _x => id #align complex.continuous_on_tan Complex.continuousOn_tan @[continuity] theorem continuous_tan : Continuous fun x : {x | cos x ≠ 0} => tan x := continuousOn_iff_continuous_restrict.1 continuousOn_tan #align complex.continuous_tan Complex.continuous_tan theorem cos_eq_iff_quadratic {z w : ℂ} : cos z = w ↔ exp (z * I) ^ 2 - 2 * w * exp (z * I) + 1 = 0 := by rw [← sub_eq_zero] field_simp [cos, exp_neg, exp_ne_zero] refine' Eq.congr _ rfl ring #align complex.cos_eq_iff_quadratic Complex.cos_eq_iff_quadratic theorem cos_surjective : Function.Surjective cos := by intro x obtain ⟨w, w₀, hw⟩ : ∃ (w : _) (_ : w ≠ 0), 1 * w * w + -2 * x * w + 1 = 0 := by rcases exists_quadratic_eq_zero one_ne_zero ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with ⟨w, hw⟩ refine' ⟨w, _, hw⟩ rintro rfl simp only [zero_add, one_ne_zero, mul_zero] at hw refine' ⟨log w / I, cos_eq_iff_quadratic.2 _⟩ rw [div_mul_cancel _ I_ne_zero, exp_log w₀] convert hw using 1 ring #align complex.cos_surjective Complex.cos_surjective @[simp] theorem range_cos : Set.range cos = Set.univ := cos_surjective.range_eq #align complex.range_cos Complex.range_cos theorem sin_surjective : Function.Surjective sin := by intro x rcases cos_surjective x with ⟨z, rfl⟩ exact ⟨z + π / 2, sin_add_pi_div_two z⟩ #align complex.sin_surjective Complex.sin_surjective @[simp] theorem range_sin : Set.range sin = Set.univ := sin_surjective.range_eq #align complex.range_sin Complex.range_sin end Complex namespace Real open scoped Real theorem cos_eq_zero_iff {θ : ℝ} : cos θ = 0 ↔ ∃ k : ℤ, θ = (2 * k + 1) * π / 2 := mod_cast @Complex.cos_eq_zero_iff θ #align real.cos_eq_zero_iff Real.cos_eq_zero_iff theorem cos_ne_zero_iff {θ : ℝ} : cos θ ≠ 0 ↔ ∀ k : ℤ, θ ≠ (2 * k + 1) * π / 2 := by rw [← not_exists, not_iff_not, cos_eq_zero_iff] #align real.cos_ne_zero_iff Real.cos_ne_zero_iff theorem cos_eq_cos_iff {x y : ℝ} : cos x = cos y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = 2 * k * π - x := mod_cast @Complex.cos_eq_cos_iff x y #align real.cos_eq_cos_iff Real.cos_eq_cos_iff theorem sin_eq_sin_iff {x y : ℝ} : sin x = sin y ↔ ∃ k : ℤ, y = 2 * k * π + x ∨ y = (2 * k + 1) * π - x := mod_cast @Complex.sin_eq_sin_iff x y #align real.sin_eq_sin_iff Real.sin_eq_sin_iff theorem lt_sin_mul {x : ℝ} (hx : 0 < x) (hx' : x < 1) : x < sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ pi_div_two_pos.ne (sub_pos.2 hx') hx #align real.lt_sin_mul Real.lt_sin_mul theorem le_sin_mul {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ 1) : x ≤ sin (π / 2 * x) := by simpa [mul_comm x] using strictConcaveOn_sin_Icc.concaveOn.2 ⟨le_rfl, pi_pos.le⟩ ⟨pi_div_two_pos.le, half_le_self pi_pos.le⟩ (sub_nonneg.2 hx') hx #align real.le_sin_mul Real.le_sin_mul theorem mul_lt_sin {x : ℝ} (hx : 0 < x) (hx' : x < π / 2) : 2 / π * x < sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @lt_sin_mul ((π / 2)⁻¹ * x) (mul_pos (inv_pos.2 pi_div_two_pos) hx) (by rwa [← div_eq_inv_mul, div_lt_one pi_div_two_pos]) #align real.mul_lt_sin Real.mul_lt_sin /-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @le_sin_mul ((π / 2)⁻¹ * x) (mul_nonneg (inv_nonneg.2 pi_div_two_pos.le) hx) (by
rwa [← div_eq_inv_mul, div_le_one pi_div_two_pos]
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x := by rw [← inv_div] simpa [-inv_div, mul_inv_cancel_left₀ pi_div_two_pos.ne'] using @le_sin_mul ((π / 2)⁻¹ * x) (mul_nonneg (inv_nonneg.2 pi_div_two_pos.le) hx) (by
Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex.241_0.wRglntQQQHH0e1R
/-- In the range `[0, π / 2]`, we have a linear lower bound on `sin`. This inequality forms one half of Jordan's inequality, the other half is `Real.sin_lt` -/ theorem mul_le_sin {x : ℝ} (hx : 0 ≤ x) (hx' : x ≤ π / 2) : 2 / π * x ≤ sin x
Mathlib_Analysis_SpecialFunctions_Trigonometric_Complex
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by
refine' ⟨_, fun h => _⟩
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Independent f → LinearIndependent K (Projectivization.rep ∘ f)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ ·
rintro ⟨ff, hff, hh⟩
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ ·
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh : LinearIndependent K ff ⊢ LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩
choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh : LinearIndependent K ff a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) ⊢ LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
convert hh.units_smul a
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_4 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh : LinearIndependent K ff a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) ⊢ (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) = a • ff
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a
ext i
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_4.h ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh : LinearIndependent K ff a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) i : ι ⊢ (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) i = (a • ff) i
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i
exact (ha i).symm
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : LinearIndependent K (Projectivization.rep ∘ f) ⊢ Independent f
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm ·
convert Independent.mk _ _ h
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm ·
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_7.h ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : LinearIndependent K (Projectivization.rep ∘ f) x✝ : ι ⊢ f x✝ = mk K ((Projectivization.rep ∘ f) x✝) (_ : ?m.15410 x✝ ≠ 0)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h ·
simp only [mk_rep, Function.comp_apply]
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h ·
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : LinearIndependent K (Projectivization.rep ∘ f) ⊢ ∀ (i : ι), (Projectivization.rep ∘ f) i ≠ 0
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] ·
intro i
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] ·
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : LinearIndependent K (Projectivization.rep ∘ f) i : ι ⊢ (Projectivization.rep ∘ f) i ≠ 0
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i
apply rep_nonzero
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i
Mathlib.LinearAlgebra.Projectivization.Independence.46_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Independent f ↔ CompleteLattice.Independent fun i => Projectivization.submodule (f i)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by
refine' ⟨_, fun h => _⟩
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Independent f → CompleteLattice.Independent fun i => Projectivization.submodule (f i)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ ·
rintro ⟨f, hf, hi⟩
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ ·
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → V hf : ∀ (i : ι), f i ≠ 0 hi : LinearIndependent K f ⊢ CompleteLattice.Independent fun i => Projectivization.submodule ((fun i => mk K (f i) (_ : f i ≠ 0)) i)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩
simp only [submodule_mk]
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → V hf : ∀ (i : ι), f i ≠ 0 hi : LinearIndependent K f ⊢ CompleteLattice.Independent fun i => Submodule.span K {f i}
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk]
exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk]
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : CompleteLattice.Independent fun i => Projectivization.submodule (f i) ⊢ Independent f
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi ·
rw [independent_iff]
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi ·
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : CompleteLattice.Independent fun i => Projectivization.submodule (f i) ⊢ LinearIndependent K (Projectivization.rep ∘ f)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff]
refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff]
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2.refine'_1 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : CompleteLattice.Independent fun i => Projectivization.submodule (f i) i : ι ⊢ (Projectivization.rep ∘ f) i ∈ (Projectivization.submodule ∘ f) i
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ ·
simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ ·
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2.refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : CompleteLattice.Independent fun i => Projectivization.submodule (f i) i : ι ⊢ (Projectivization.rep ∘ f) i ≠ 0
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ ·
exact rep_nonzero (f i)
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ ·
Mathlib.LinearAlgebra.Projectivization.Independence.61_0.owtLEGtk9UFDfW6
/-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by
refine' ⟨_, fun h => _⟩
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Dependent f → ¬LinearIndependent K (Projectivization.rep ∘ f)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ ·
rintro ⟨ff, hff, hh1⟩
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ ·
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh1 : ¬LinearIndependent K ff ⊢ ¬LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0))
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩
contrapose! hh1
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) ⊢ LinearIndependent K ff
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1
choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_1.mk ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) ⊢ LinearIndependent K ff
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
convert hh1.units_smul a⁻¹
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i)
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_4 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) ⊢ ff = a⁻¹ • Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹
ext i
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_4.h ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V ff : ι → V hff : ∀ (i : ι), ff i ≠ 0 hh1 : LinearIndependent K (Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) a : ι → Kˣ ha : ∀ (i : ι), a i • ff i = Projectivization.rep (mk K (ff i) (_ : ff i ≠ 0)) i : ι ⊢ ff i = (a⁻¹ • Projectivization.rep ∘ fun i => mk K (ff i) (_ : ff i ≠ 0)) i
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i
simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply]
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : ¬LinearIndependent K (Projectivization.rep ∘ f) ⊢ Dependent f
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] ·
convert Dependent.mk _ _ h
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] ·
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case h.e'_7.h ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : ¬LinearIndependent K (Projectivization.rep ∘ f) x✝ : ι ⊢ f x✝ = mk K ((Projectivization.rep ∘ f) x✝) (_ : ?m.37767 x✝ ≠ 0)
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h ·
simp only [mk_rep, Function.comp_apply]
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h ·
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
case refine'_2 ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V h : ¬LinearIndependent K (Projectivization.rep ∘ f) ⊢ ∀ (i : ι), (Projectivization.rep ∘ f) i ≠ 0
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] ·
exact fun i => rep_nonzero (f i)
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] ·
Mathlib.LinearAlgebra.Projectivization.Independence.82_0.owtLEGtk9UFDfW6
/-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f)
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Dependent f ↔ ¬Independent f
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by
rw [dependent_iff, independent_iff]
/-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by
Mathlib.LinearAlgebra.Projectivization.Independence.97_0.owtLEGtk9UFDfW6
/-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V ⊢ Independent f ↔ ¬Dependent f
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by rw [dependent_iff, independent_iff] #align projectivization.dependent_iff_not_independent Projectivization.dependent_iff_not_independent /-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by
rw [dependent_iff_not_independent, Classical.not_not]
/-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by
Mathlib.LinearAlgebra.Projectivization.Independence.102_0.owtLEGtk9UFDfW6
/-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V u v : ℙ K V ⊢ Dependent ![u, v] ↔ u = v
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by rw [dependent_iff, independent_iff] #align projectivization.dependent_iff_not_independent Projectivization.dependent_iff_not_independent /-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by rw [dependent_iff_not_independent, Classical.not_not] #align projectivization.independent_iff_not_dependent Projectivization.independent_iff_not_dependent /-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by
rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def]
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by
Mathlib.LinearAlgebra.Projectivization.Independence.107_0.owtLEGtk9UFDfW6
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V u v : ℙ K V ⊢ ¬(¬Projectivization.rep v = 0 ∧ ∀ (a : K), a • Projectivization.rep v ≠ (Projectivization.rep ∘ ![u, v]) 0) ↔ u = v
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by rw [dependent_iff, independent_iff] #align projectivization.dependent_iff_not_independent Projectivization.dependent_iff_not_independent /-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by rw [dependent_iff_not_independent, Classical.not_not] #align projectivization.independent_iff_not_dependent Projectivization.independent_iff_not_dependent /-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def]
simp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply, ← mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, imp_iff_right_iff]
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def]
Mathlib.LinearAlgebra.Projectivization.Independence.107_0.owtLEGtk9UFDfW6
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V u v : ℙ K V ⊢ ¬Projectivization.rep v = 0 ∨ u = v
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by rw [dependent_iff, independent_iff] #align projectivization.dependent_iff_not_independent Projectivization.dependent_iff_not_independent /-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by rw [dependent_iff_not_independent, Classical.not_not] #align projectivization.independent_iff_not_dependent Projectivization.independent_iff_not_dependent /-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def] simp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply, ← mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, imp_iff_right_iff]
exact Or.inl (rep_nonzero v)
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def] simp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply, ← mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, imp_iff_right_iff]
Mathlib.LinearAlgebra.Projectivization.Independence.107_0.owtLEGtk9UFDfW6
/-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v
Mathlib_LinearAlgebra_Projectivization_Independence
ι : Type u_1 K : Type u_2 V : Type u_3 inst✝² : Field K inst✝¹ : AddCommGroup V inst✝ : Module K V f : ι → ℙ K V u v : ℙ K V ⊢ Independent ![u, v] ↔ u ≠ v
/- Copyright (c) 2022 Michael Blyth. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Michael Blyth -/ import Mathlib.LinearAlgebra.Projectivization.Basic #align_import linear_algebra.projective_space.independence from "leanprover-community/mathlib"@"1e82f5ec4645f6a92bb9e02fce51e44e3bc3e1fe" /-! # Independence in Projective Space In this file we define independence and dependence of families of elements in projective space. ## Implementation Details We use an inductive definition to define the independence of points in projective space, where the only constructor assumes an independent family of vectors from the ambient vector space. Similarly for the definition of dependence. ## Results - A family of elements is dependent if and only if it is not independent. - Two elements are dependent if and only if they are equal. # Future Work - Define collinearity in projective space. - Prove the axioms of a projective geometry are satisfied by the dependence relation. - Define projective linear subspaces. -/ open scoped LinearAlgebra.Projectivization variable {ι K V : Type*} [Field K] [AddCommGroup V] [Module K V] {f : ι → ℙ K V} namespace Projectivization /-- A linearly independent family of nonzero vectors gives an independent family of points in projective space. -/ inductive Independent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (hl : LinearIndependent K f) : Independent fun i => mk K (f i) (hf i) #align projectivization.independent Projectivization.Independent /-- A family of points in a projective space is independent if and only if the representative vectors determined by the family are linearly independent. -/ theorem independent_iff : Independent f ↔ LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh⟩ choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh.units_smul a ext i exact (ha i).symm · convert Independent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · intro i apply rep_nonzero #align projectivization.independent_iff Projectivization.independent_iff /-- A family of points in projective space is independent if and only if the family of submodules which the points determine is independent in the lattice-theoretic sense. -/ theorem independent_iff_completeLattice_independent : Independent f ↔ CompleteLattice.Independent fun i => (f i).submodule := by refine' ⟨_, fun h => _⟩ · rintro ⟨f, hf, hi⟩ simp only [submodule_mk] exact (CompleteLattice.independent_iff_linearIndependent_of_ne_zero (R := K) hf).mpr hi · rw [independent_iff] refine' h.linearIndependent (Projectivization.submodule ∘ f) (fun i => _) fun i => _ · simpa only [Function.comp_apply, submodule_eq] using Submodule.mem_span_singleton_self _ · exact rep_nonzero (f i) #align projectivization.independent_iff_complete_lattice_independent Projectivization.independent_iff_completeLattice_independent /-- A linearly dependent family of nonzero vectors gives a dependent family of points in projective space. -/ inductive Dependent : (ι → ℙ K V) → Prop | mk (f : ι → V) (hf : ∀ i : ι, f i ≠ 0) (h : ¬LinearIndependent K f) : Dependent fun i => mk K (f i) (hf i) #align projectivization.dependent Projectivization.Dependent /-- A family of points in a projective space is dependent if and only if their representatives are linearly dependent. -/ theorem dependent_iff : Dependent f ↔ ¬LinearIndependent K (Projectivization.rep ∘ f) := by refine' ⟨_, fun h => _⟩ · rintro ⟨ff, hff, hh1⟩ contrapose! hh1 choose a ha using fun i : ι => exists_smul_eq_mk_rep K (ff i) (hff i) convert hh1.units_smul a⁻¹ ext i simp only [← ha, inv_smul_smul, Pi.smul_apply', Pi.inv_apply, Function.comp_apply] · convert Dependent.mk _ _ h · simp only [mk_rep, Function.comp_apply] · exact fun i => rep_nonzero (f i) #align projectivization.dependent_iff Projectivization.dependent_iff /-- Dependence is the negation of independence. -/ theorem dependent_iff_not_independent : Dependent f ↔ ¬Independent f := by rw [dependent_iff, independent_iff] #align projectivization.dependent_iff_not_independent Projectivization.dependent_iff_not_independent /-- Independence is the negation of dependence. -/ theorem independent_iff_not_dependent : Independent f ↔ ¬Dependent f := by rw [dependent_iff_not_independent, Classical.not_not] #align projectivization.independent_iff_not_dependent Projectivization.independent_iff_not_dependent /-- Two points in a projective space are dependent if and only if they are equal. -/ @[simp] theorem dependent_pair_iff_eq (u v : ℙ K V) : Dependent ![u, v] ↔ u = v := by rw [dependent_iff_not_independent, independent_iff, linearIndependent_fin2, Function.comp_apply, Matrix.cons_val_one, Matrix.head_cons, Ne.def] simp only [Matrix.cons_val_zero, not_and, not_forall, Classical.not_not, Function.comp_apply, ← mk_eq_mk_iff' K _ _ (rep_nonzero u) (rep_nonzero v), mk_rep, imp_iff_right_iff] exact Or.inl (rep_nonzero v) #align projectivization.dependent_pair_iff_eq Projectivization.dependent_pair_iff_eq /-- Two points in a projective space are independent if and only if the points are not equal. -/ @[simp] theorem independent_pair_iff_neq (u v : ℙ K V) : Independent ![u, v] ↔ u ≠ v := by
rw [independent_iff_not_dependent, dependent_pair_iff_eq u v]
/-- Two points in a projective space are independent if and only if the points are not equal. -/ @[simp] theorem independent_pair_iff_neq (u v : ℙ K V) : Independent ![u, v] ↔ u ≠ v := by
Mathlib.LinearAlgebra.Projectivization.Independence.117_0.owtLEGtk9UFDfW6
/-- Two points in a projective space are independent if and only if the points are not equal. -/ @[simp] theorem independent_pair_iff_neq (u v : ℙ K V) : Independent ![u, v] ↔ u ≠ v
Mathlib_LinearAlgebra_Projectivization_Independence
α : Type u β : Type v γ : Type w inst✝¹ : TopologicalSpace α inst✝ : PartialOrder α t : OrderClosedTopology α ⊢ IsClosed (diagonal α)
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Data.Set.Intervals.Pi import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Order.Filter.Interval import Mathlib.Tactic.TFAE import Mathlib.Topology.Support import Mathlib.Topology.Algebra.Order.LeftRight #align_import topology.order.basic from "leanprover-community/mathlib"@"3efd324a3a31eaa40c9d5bfc669c4fafee5f9423" /-! # Theory of topology on ordered spaces ## Main definitions The order topology on an ordered space is the topology generated by all open intervals (or equivalently by those of the form `(-∞, a)` and `(b, +∞)`). We define it as `Preorder.topology α`. However, we do *not* register it as an instance (as many existing ordered types already have topologies, which would be equal but not definitionally equal to `Preorder.topology α`). Instead, we introduce a class `OrderTopology α` (which is a `Prop`, also known as a mixin) saying that on the type `α` having already a topological space structure and a preorder structure, the topological structure is equal to the order topology. We also introduce another (mixin) class `OrderClosedTopology α` saying that the set of points `(x, y)` with `x ≤ y` is closed in the product space. This is automatically satisfied on a linear order with the order topology. We prove many basic properties of such topologies. ## Main statements This file contains the proofs of the following facts. For exact requirements (`OrderClosedTopology` vs `OrderTopology`, `Preorder` vs `PartialOrder` vs `LinearOrder` etc) see their statements. ### Open / closed sets * `isOpen_lt` : if `f` and `g` are continuous functions, then `{x | f x < g x}` is open; * `isOpen_Iio`, `isOpen_Ioi`, `isOpen_Ioo` : open intervals are open; * `isClosed_le` : if `f` and `g` are continuous functions, then `{x | f x ≤ g x}` is closed; * `isClosed_Iic`, `isClosed_Ici`, `isClosed_Icc` : closed intervals are closed; * `frontier_le_subset_eq`, `frontier_lt_subset_eq` : frontiers of both `{x | f x ≤ g x}` and `{x | f x < g x}` are included by `{x | f x = g x}`; * `exists_Ioc_subset_of_mem_nhds`, `exists_Ico_subset_of_mem_nhds` : if `x < y`, then any neighborhood of `x` includes an interval `[x, z)` for some `z ∈ (x, y]`, and any neighborhood of `y` includes an interval `(z, y]` for some `z ∈ [x, y)`. ### Convergence and inequalities * `le_of_tendsto_of_tendsto` : if `f` converges to `a`, `g` converges to `b`, and eventually `f x ≤ g x`, then `a ≤ b` * `le_of_tendsto`, `ge_of_tendsto` : if `f` converges to `a` and eventually `f x ≤ b` (resp., `b ≤ f x`), then `a ≤ b` (resp., `b ≤ a`); we also provide primed versions that assume the inequalities to hold for all `x`. ### Min, max, `sSup` and `sInf` * `Continuous.min`, `Continuous.max`: pointwise `min`/`max` of two continuous functions is continuous. * `Tendsto.min`, `Tendsto.max` : if `f` tends to `a` and `g` tends to `b`, then their pointwise `min`/`max` tend to `min a b` and `max a b`, respectively. * `tendsto_of_tendsto_of_tendsto_of_le_of_le` : theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; if `g` and `h` both converge to `a`, and eventually `g x ≤ f x ≤ h x`, then `f` converges to `a`. ## Implementation notes We do _not_ register the order topology as an instance on a preorder (or even on a linear order). Indeed, on many such spaces, a topology has already been constructed in a different way (think of the discrete spaces `ℕ` or `ℤ`, or `ℝ` that could inherit a topology as the completion of `ℚ`), and is in general not defeq to the one generated by the intervals. We make it available as a definition `Preorder.topology α` though, that can be registered as an instance when necessary, or for specific types. -/ open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) universe u v w variable {α : Type u} {β : Type v} {γ : Type w} /-- If `α` is a topological space and a preorder, `ClosedIicTopology α` means that `Iic a` is closed for all `a : α`. -/ class ClosedIicTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | b ≤ a}` is closed. -/ isClosed_le' (a : α) : IsClosed { b : α | b ≤ a } export ClosedIicTopology (isClosed_le') #align is_closed_le' ClosedIicTopology.isClosed_le' /-- If `α` is a topological space and a preorder, `ClosedIciTopology α` means that `Ici a` is closed for all `a : α`. -/ class ClosedIciTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | a ≤ b}` is closed. -/ isClosed_ge' (a : α) : IsClosed { b : α | a ≤ b } export ClosedIciTopology (isClosed_ge') #align is_closed_ge' ClosedIciTopology.isClosed_ge' /-- A topology on a set which is both a topological space and a preorder is _order-closed_ if the set of points `(x, y)` with `x ≤ y` is closed in the product space. We introduce this as a mixin. This property is satisfied for the order topology on a linear order, but it can be satisfied more generally, and suffices to derive many interesting properties relating order and topology. -/ class OrderClosedTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- The set `{ (x, y) | x ≤ y }` is a closed set. -/ isClosed_le' : IsClosed { p : α × α | p.1 ≤ p.2 } #align order_closed_topology OrderClosedTopology instance [TopologicalSpace α] [h : FirstCountableTopology α] : FirstCountableTopology αᵒᵈ := h instance [TopologicalSpace α] [h : SecondCountableTopology α] : SecondCountableTopology αᵒᵈ := h theorem Dense.orderDual [TopologicalSpace α] {s : Set α} (hs : Dense s) : Dense (OrderDual.ofDual ⁻¹' s) := hs #align dense.order_dual Dense.orderDual section ClosedIicTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIicTopology α] instance : ClosedIciTopology αᵒᵈ where isClosed_ge' a := isClosed_le' (α := α) a theorem isClosed_Iic {a : α} : IsClosed (Iic a) := isClosed_le' a #align is_closed_Iic isClosed_Iic @[simp] theorem closure_Iic (a : α) : closure (Iic a) = Iic a := isClosed_Iic.closure_eq #align closure_Iic closure_Iic theorem le_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, f c ≤ b) : a ≤ b := (isClosed_le' b).mem_of_tendsto lim h #align le_of_tendsto le_of_tendsto theorem le_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, f c ≤ b) : a ≤ b := le_of_tendsto lim (eventually_of_forall h) #align le_of_tendsto' le_of_tendsto' end ClosedIicTopology section ClosedIciTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIciTopology α] instance : ClosedIicTopology αᵒᵈ where isClosed_le' a := isClosed_ge' (α := α) a theorem isClosed_Ici {a : α} : IsClosed (Ici a) := isClosed_ge' a #align is_closed_Ici isClosed_Ici @[simp] theorem closure_Ici (a : α) : closure (Ici a) = Ici a := isClosed_Ici.closure_eq #align closure_Ici closure_Ici theorem ge_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, b ≤ f c) : b ≤ a := (isClosed_ge' b).mem_of_tendsto lim h #align ge_of_tendsto ge_of_tendsto theorem ge_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, b ≤ f c) : b ≤ a := ge_of_tendsto lim (eventually_of_forall h) #align ge_of_tendsto' ge_of_tendsto' end ClosedIciTopology section OrderClosedTopology section Preorder variable [TopologicalSpace α] [Preorder α] [t : OrderClosedTopology α] namespace Subtype -- todo: add `OrderEmbedding.orderClosedTopology` instance {p : α → Prop} : OrderClosedTopology (Subtype p) := have this : Continuous fun p : Subtype p × Subtype p => ((p.fst : α), (p.snd : α)) := continuous_subtype_val.prod_map continuous_subtype_val OrderClosedTopology.mk (t.isClosed_le'.preimage this) end Subtype theorem isClosed_le_prod : IsClosed { p : α × α | p.1 ≤ p.2 } := t.isClosed_le' #align is_closed_le_prod isClosed_le_prod theorem isClosed_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsClosed { b | f b ≤ g b } := continuous_iff_isClosed.mp (hf.prod_mk hg) _ isClosed_le_prod #align is_closed_le isClosed_le instance : ClosedIicTopology α where isClosed_le' _ := isClosed_le continuous_id continuous_const instance : ClosedIciTopology α where isClosed_ge' _ := isClosed_le continuous_const continuous_id instance : OrderClosedTopology αᵒᵈ := ⟨(OrderClosedTopology.isClosed_le' (α := α)).preimage continuous_swap⟩ theorem isClosed_Icc {a b : α} : IsClosed (Icc a b) := IsClosed.inter isClosed_Ici isClosed_Iic #align is_closed_Icc isClosed_Icc @[simp] theorem closure_Icc (a b : α) : closure (Icc a b) = Icc a b := isClosed_Icc.closure_eq #align closure_Icc closure_Icc theorem le_of_tendsto_of_tendsto {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : f ≤ᶠ[b] g) : a₁ ≤ a₂ := have : Tendsto (fun b => (f b, g b)) b (𝓝 (a₁, a₂)) := hf.prod_mk_nhds hg show (a₁, a₂) ∈ { p : α × α | p.1 ≤ p.2 } from t.isClosed_le'.mem_of_tendsto this h #align le_of_tendsto_of_tendsto le_of_tendsto_of_tendsto alias tendsto_le_of_eventuallyLE := le_of_tendsto_of_tendsto #align tendsto_le_of_eventually_le tendsto_le_of_eventuallyLE theorem le_of_tendsto_of_tendsto' {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : ∀ x, f x ≤ g x) : a₁ ≤ a₂ := le_of_tendsto_of_tendsto hf hg (eventually_of_forall h) #align le_of_tendsto_of_tendsto' le_of_tendsto_of_tendsto' @[simp] theorem closure_le_eq [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b ≤ g b } = { b | f b ≤ g b } := (isClosed_le hf hg).closure_eq #align closure_le_eq closure_le_eq theorem closure_lt_subset_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b < g b } ⊆ { b | f b ≤ g b } := (closure_minimal fun _ => le_of_lt) <| isClosed_le hf hg #align closure_lt_subset_le closure_lt_subset_le theorem ContinuousWithinAt.closure_le [TopologicalSpace β] {f g : β → α} {s : Set β} {x : β} (hx : x ∈ closure s) (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) (h : ∀ y ∈ s, f y ≤ g y) : f x ≤ g x := show (f x, g x) ∈ { p : α × α | p.1 ≤ p.2 } from OrderClosedTopology.isClosed_le'.closure_subset ((hf.prod hg).mem_closure hx h) #align continuous_within_at.closure_le ContinuousWithinAt.closure_le /-- If `s` is a closed set and two functions `f` and `g` are continuous on `s`, then the set `{x ∈ s | f x ≤ g x}` is a closed set. -/ theorem IsClosed.isClosed_le [TopologicalSpace β] {f g : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) (hg : ContinuousOn g s) : IsClosed ({ x ∈ s | f x ≤ g x }) := (hf.prod hg).preimage_isClosed_of_isClosed hs OrderClosedTopology.isClosed_le' #align is_closed.is_closed_le IsClosed.isClosed_le theorem le_on_closure [TopologicalSpace β] {f g : β → α} {s : Set β} (h : ∀ x ∈ s, f x ≤ g x) (hf : ContinuousOn f (closure s)) (hg : ContinuousOn g (closure s)) ⦃x⦄ (hx : x ∈ closure s) : f x ≤ g x := have : s ⊆ { y ∈ closure s | f y ≤ g y } := fun y hy => ⟨subset_closure hy, h y hy⟩ (closure_minimal this (isClosed_closure.isClosed_le hf hg) hx).2 #align le_on_closure le_on_closure theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 } := (hs.preimage continuous_fst).isClosed_le (hf.comp continuousOn_fst Subset.rfl) continuousOn_snd #align is_closed.epigraph IsClosed.epigraph theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ p.2 ≤ f p.1 } := (hs.preimage continuous_fst).isClosed_le continuousOn_snd (hf.comp continuousOn_fst Subset.rfl) #align is_closed.hypograph IsClosed.hypograph end Preorder section PartialOrder variable [TopologicalSpace α] [PartialOrder α] [t : OrderClosedTopology α] -- see Note [lower instance priority] instance (priority := 90) OrderClosedTopology.to_t2Space : T2Space α := t2_iff_isClosed_diagonal.2 <| by
simpa only [diagonal, le_antisymm_iff] using t.isClosed_le'.inter (isClosed_le continuous_snd continuous_fst)
instance (priority := 90) OrderClosedTopology.to_t2Space : T2Space α := t2_iff_isClosed_diagonal.2 <| by
Mathlib.Topology.Order.Basic.286_0.Npdof1X5b8sCkZ2
instance (priority
Mathlib_Topology_Order_Basic
α : Type u β : Type v γ : Type w inst✝³ : TopologicalSpace α inst✝² : LinearOrder α inst✝¹ : OrderClosedTopology α inst✝ : TopologicalSpace β f g : β → α hf : Continuous f hg : Continuous g ⊢ IsOpen {b | f b < g b}
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Data.Set.Intervals.Pi import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Order.Filter.Interval import Mathlib.Tactic.TFAE import Mathlib.Topology.Support import Mathlib.Topology.Algebra.Order.LeftRight #align_import topology.order.basic from "leanprover-community/mathlib"@"3efd324a3a31eaa40c9d5bfc669c4fafee5f9423" /-! # Theory of topology on ordered spaces ## Main definitions The order topology on an ordered space is the topology generated by all open intervals (or equivalently by those of the form `(-∞, a)` and `(b, +∞)`). We define it as `Preorder.topology α`. However, we do *not* register it as an instance (as many existing ordered types already have topologies, which would be equal but not definitionally equal to `Preorder.topology α`). Instead, we introduce a class `OrderTopology α` (which is a `Prop`, also known as a mixin) saying that on the type `α` having already a topological space structure and a preorder structure, the topological structure is equal to the order topology. We also introduce another (mixin) class `OrderClosedTopology α` saying that the set of points `(x, y)` with `x ≤ y` is closed in the product space. This is automatically satisfied on a linear order with the order topology. We prove many basic properties of such topologies. ## Main statements This file contains the proofs of the following facts. For exact requirements (`OrderClosedTopology` vs `OrderTopology`, `Preorder` vs `PartialOrder` vs `LinearOrder` etc) see their statements. ### Open / closed sets * `isOpen_lt` : if `f` and `g` are continuous functions, then `{x | f x < g x}` is open; * `isOpen_Iio`, `isOpen_Ioi`, `isOpen_Ioo` : open intervals are open; * `isClosed_le` : if `f` and `g` are continuous functions, then `{x | f x ≤ g x}` is closed; * `isClosed_Iic`, `isClosed_Ici`, `isClosed_Icc` : closed intervals are closed; * `frontier_le_subset_eq`, `frontier_lt_subset_eq` : frontiers of both `{x | f x ≤ g x}` and `{x | f x < g x}` are included by `{x | f x = g x}`; * `exists_Ioc_subset_of_mem_nhds`, `exists_Ico_subset_of_mem_nhds` : if `x < y`, then any neighborhood of `x` includes an interval `[x, z)` for some `z ∈ (x, y]`, and any neighborhood of `y` includes an interval `(z, y]` for some `z ∈ [x, y)`. ### Convergence and inequalities * `le_of_tendsto_of_tendsto` : if `f` converges to `a`, `g` converges to `b`, and eventually `f x ≤ g x`, then `a ≤ b` * `le_of_tendsto`, `ge_of_tendsto` : if `f` converges to `a` and eventually `f x ≤ b` (resp., `b ≤ f x`), then `a ≤ b` (resp., `b ≤ a`); we also provide primed versions that assume the inequalities to hold for all `x`. ### Min, max, `sSup` and `sInf` * `Continuous.min`, `Continuous.max`: pointwise `min`/`max` of two continuous functions is continuous. * `Tendsto.min`, `Tendsto.max` : if `f` tends to `a` and `g` tends to `b`, then their pointwise `min`/`max` tend to `min a b` and `max a b`, respectively. * `tendsto_of_tendsto_of_tendsto_of_le_of_le` : theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; if `g` and `h` both converge to `a`, and eventually `g x ≤ f x ≤ h x`, then `f` converges to `a`. ## Implementation notes We do _not_ register the order topology as an instance on a preorder (or even on a linear order). Indeed, on many such spaces, a topology has already been constructed in a different way (think of the discrete spaces `ℕ` or `ℤ`, or `ℝ` that could inherit a topology as the completion of `ℚ`), and is in general not defeq to the one generated by the intervals. We make it available as a definition `Preorder.topology α` though, that can be registered as an instance when necessary, or for specific types. -/ open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) universe u v w variable {α : Type u} {β : Type v} {γ : Type w} /-- If `α` is a topological space and a preorder, `ClosedIicTopology α` means that `Iic a` is closed for all `a : α`. -/ class ClosedIicTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | b ≤ a}` is closed. -/ isClosed_le' (a : α) : IsClosed { b : α | b ≤ a } export ClosedIicTopology (isClosed_le') #align is_closed_le' ClosedIicTopology.isClosed_le' /-- If `α` is a topological space and a preorder, `ClosedIciTopology α` means that `Ici a` is closed for all `a : α`. -/ class ClosedIciTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | a ≤ b}` is closed. -/ isClosed_ge' (a : α) : IsClosed { b : α | a ≤ b } export ClosedIciTopology (isClosed_ge') #align is_closed_ge' ClosedIciTopology.isClosed_ge' /-- A topology on a set which is both a topological space and a preorder is _order-closed_ if the set of points `(x, y)` with `x ≤ y` is closed in the product space. We introduce this as a mixin. This property is satisfied for the order topology on a linear order, but it can be satisfied more generally, and suffices to derive many interesting properties relating order and topology. -/ class OrderClosedTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- The set `{ (x, y) | x ≤ y }` is a closed set. -/ isClosed_le' : IsClosed { p : α × α | p.1 ≤ p.2 } #align order_closed_topology OrderClosedTopology instance [TopologicalSpace α] [h : FirstCountableTopology α] : FirstCountableTopology αᵒᵈ := h instance [TopologicalSpace α] [h : SecondCountableTopology α] : SecondCountableTopology αᵒᵈ := h theorem Dense.orderDual [TopologicalSpace α] {s : Set α} (hs : Dense s) : Dense (OrderDual.ofDual ⁻¹' s) := hs #align dense.order_dual Dense.orderDual section ClosedIicTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIicTopology α] instance : ClosedIciTopology αᵒᵈ where isClosed_ge' a := isClosed_le' (α := α) a theorem isClosed_Iic {a : α} : IsClosed (Iic a) := isClosed_le' a #align is_closed_Iic isClosed_Iic @[simp] theorem closure_Iic (a : α) : closure (Iic a) = Iic a := isClosed_Iic.closure_eq #align closure_Iic closure_Iic theorem le_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, f c ≤ b) : a ≤ b := (isClosed_le' b).mem_of_tendsto lim h #align le_of_tendsto le_of_tendsto theorem le_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, f c ≤ b) : a ≤ b := le_of_tendsto lim (eventually_of_forall h) #align le_of_tendsto' le_of_tendsto' end ClosedIicTopology section ClosedIciTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIciTopology α] instance : ClosedIicTopology αᵒᵈ where isClosed_le' a := isClosed_ge' (α := α) a theorem isClosed_Ici {a : α} : IsClosed (Ici a) := isClosed_ge' a #align is_closed_Ici isClosed_Ici @[simp] theorem closure_Ici (a : α) : closure (Ici a) = Ici a := isClosed_Ici.closure_eq #align closure_Ici closure_Ici theorem ge_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, b ≤ f c) : b ≤ a := (isClosed_ge' b).mem_of_tendsto lim h #align ge_of_tendsto ge_of_tendsto theorem ge_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, b ≤ f c) : b ≤ a := ge_of_tendsto lim (eventually_of_forall h) #align ge_of_tendsto' ge_of_tendsto' end ClosedIciTopology section OrderClosedTopology section Preorder variable [TopologicalSpace α] [Preorder α] [t : OrderClosedTopology α] namespace Subtype -- todo: add `OrderEmbedding.orderClosedTopology` instance {p : α → Prop} : OrderClosedTopology (Subtype p) := have this : Continuous fun p : Subtype p × Subtype p => ((p.fst : α), (p.snd : α)) := continuous_subtype_val.prod_map continuous_subtype_val OrderClosedTopology.mk (t.isClosed_le'.preimage this) end Subtype theorem isClosed_le_prod : IsClosed { p : α × α | p.1 ≤ p.2 } := t.isClosed_le' #align is_closed_le_prod isClosed_le_prod theorem isClosed_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsClosed { b | f b ≤ g b } := continuous_iff_isClosed.mp (hf.prod_mk hg) _ isClosed_le_prod #align is_closed_le isClosed_le instance : ClosedIicTopology α where isClosed_le' _ := isClosed_le continuous_id continuous_const instance : ClosedIciTopology α where isClosed_ge' _ := isClosed_le continuous_const continuous_id instance : OrderClosedTopology αᵒᵈ := ⟨(OrderClosedTopology.isClosed_le' (α := α)).preimage continuous_swap⟩ theorem isClosed_Icc {a b : α} : IsClosed (Icc a b) := IsClosed.inter isClosed_Ici isClosed_Iic #align is_closed_Icc isClosed_Icc @[simp] theorem closure_Icc (a b : α) : closure (Icc a b) = Icc a b := isClosed_Icc.closure_eq #align closure_Icc closure_Icc theorem le_of_tendsto_of_tendsto {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : f ≤ᶠ[b] g) : a₁ ≤ a₂ := have : Tendsto (fun b => (f b, g b)) b (𝓝 (a₁, a₂)) := hf.prod_mk_nhds hg show (a₁, a₂) ∈ { p : α × α | p.1 ≤ p.2 } from t.isClosed_le'.mem_of_tendsto this h #align le_of_tendsto_of_tendsto le_of_tendsto_of_tendsto alias tendsto_le_of_eventuallyLE := le_of_tendsto_of_tendsto #align tendsto_le_of_eventually_le tendsto_le_of_eventuallyLE theorem le_of_tendsto_of_tendsto' {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : ∀ x, f x ≤ g x) : a₁ ≤ a₂ := le_of_tendsto_of_tendsto hf hg (eventually_of_forall h) #align le_of_tendsto_of_tendsto' le_of_tendsto_of_tendsto' @[simp] theorem closure_le_eq [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b ≤ g b } = { b | f b ≤ g b } := (isClosed_le hf hg).closure_eq #align closure_le_eq closure_le_eq theorem closure_lt_subset_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b < g b } ⊆ { b | f b ≤ g b } := (closure_minimal fun _ => le_of_lt) <| isClosed_le hf hg #align closure_lt_subset_le closure_lt_subset_le theorem ContinuousWithinAt.closure_le [TopologicalSpace β] {f g : β → α} {s : Set β} {x : β} (hx : x ∈ closure s) (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) (h : ∀ y ∈ s, f y ≤ g y) : f x ≤ g x := show (f x, g x) ∈ { p : α × α | p.1 ≤ p.2 } from OrderClosedTopology.isClosed_le'.closure_subset ((hf.prod hg).mem_closure hx h) #align continuous_within_at.closure_le ContinuousWithinAt.closure_le /-- If `s` is a closed set and two functions `f` and `g` are continuous on `s`, then the set `{x ∈ s | f x ≤ g x}` is a closed set. -/ theorem IsClosed.isClosed_le [TopologicalSpace β] {f g : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) (hg : ContinuousOn g s) : IsClosed ({ x ∈ s | f x ≤ g x }) := (hf.prod hg).preimage_isClosed_of_isClosed hs OrderClosedTopology.isClosed_le' #align is_closed.is_closed_le IsClosed.isClosed_le theorem le_on_closure [TopologicalSpace β] {f g : β → α} {s : Set β} (h : ∀ x ∈ s, f x ≤ g x) (hf : ContinuousOn f (closure s)) (hg : ContinuousOn g (closure s)) ⦃x⦄ (hx : x ∈ closure s) : f x ≤ g x := have : s ⊆ { y ∈ closure s | f y ≤ g y } := fun y hy => ⟨subset_closure hy, h y hy⟩ (closure_minimal this (isClosed_closure.isClosed_le hf hg) hx).2 #align le_on_closure le_on_closure theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 } := (hs.preimage continuous_fst).isClosed_le (hf.comp continuousOn_fst Subset.rfl) continuousOn_snd #align is_closed.epigraph IsClosed.epigraph theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ p.2 ≤ f p.1 } := (hs.preimage continuous_fst).isClosed_le continuousOn_snd (hf.comp continuousOn_fst Subset.rfl) #align is_closed.hypograph IsClosed.hypograph end Preorder section PartialOrder variable [TopologicalSpace α] [PartialOrder α] [t : OrderClosedTopology α] -- see Note [lower instance priority] instance (priority := 90) OrderClosedTopology.to_t2Space : T2Space α := t2_iff_isClosed_diagonal.2 <| by simpa only [diagonal, le_antisymm_iff] using t.isClosed_le'.inter (isClosed_le continuous_snd continuous_fst) #align order_closed_topology.to_t2_space OrderClosedTopology.to_t2Space end PartialOrder section LinearOrder variable [TopologicalSpace α] [LinearOrder α] [OrderClosedTopology α] theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsOpen { b | f b < g b } := by
simpa only [lt_iff_not_le] using (isClosed_le hg hf).isOpen_compl
theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsOpen { b | f b < g b } := by
Mathlib.Topology.Order.Basic.298_0.Npdof1X5b8sCkZ2
theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsOpen { b | f b < g b }
Mathlib_Topology_Order_Basic
α : Type u β : Type v γ : Type w inst✝² : TopologicalSpace α inst✝¹ : LinearOrder α inst✝ : OrderClosedTopology α a b : α ⊢ Ioo a b ⊆ closure (interior (Ioo a b))
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Data.Set.Intervals.Pi import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Order.Filter.Interval import Mathlib.Tactic.TFAE import Mathlib.Topology.Support import Mathlib.Topology.Algebra.Order.LeftRight #align_import topology.order.basic from "leanprover-community/mathlib"@"3efd324a3a31eaa40c9d5bfc669c4fafee5f9423" /-! # Theory of topology on ordered spaces ## Main definitions The order topology on an ordered space is the topology generated by all open intervals (or equivalently by those of the form `(-∞, a)` and `(b, +∞)`). We define it as `Preorder.topology α`. However, we do *not* register it as an instance (as many existing ordered types already have topologies, which would be equal but not definitionally equal to `Preorder.topology α`). Instead, we introduce a class `OrderTopology α` (which is a `Prop`, also known as a mixin) saying that on the type `α` having already a topological space structure and a preorder structure, the topological structure is equal to the order topology. We also introduce another (mixin) class `OrderClosedTopology α` saying that the set of points `(x, y)` with `x ≤ y` is closed in the product space. This is automatically satisfied on a linear order with the order topology. We prove many basic properties of such topologies. ## Main statements This file contains the proofs of the following facts. For exact requirements (`OrderClosedTopology` vs `OrderTopology`, `Preorder` vs `PartialOrder` vs `LinearOrder` etc) see their statements. ### Open / closed sets * `isOpen_lt` : if `f` and `g` are continuous functions, then `{x | f x < g x}` is open; * `isOpen_Iio`, `isOpen_Ioi`, `isOpen_Ioo` : open intervals are open; * `isClosed_le` : if `f` and `g` are continuous functions, then `{x | f x ≤ g x}` is closed; * `isClosed_Iic`, `isClosed_Ici`, `isClosed_Icc` : closed intervals are closed; * `frontier_le_subset_eq`, `frontier_lt_subset_eq` : frontiers of both `{x | f x ≤ g x}` and `{x | f x < g x}` are included by `{x | f x = g x}`; * `exists_Ioc_subset_of_mem_nhds`, `exists_Ico_subset_of_mem_nhds` : if `x < y`, then any neighborhood of `x` includes an interval `[x, z)` for some `z ∈ (x, y]`, and any neighborhood of `y` includes an interval `(z, y]` for some `z ∈ [x, y)`. ### Convergence and inequalities * `le_of_tendsto_of_tendsto` : if `f` converges to `a`, `g` converges to `b`, and eventually `f x ≤ g x`, then `a ≤ b` * `le_of_tendsto`, `ge_of_tendsto` : if `f` converges to `a` and eventually `f x ≤ b` (resp., `b ≤ f x`), then `a ≤ b` (resp., `b ≤ a`); we also provide primed versions that assume the inequalities to hold for all `x`. ### Min, max, `sSup` and `sInf` * `Continuous.min`, `Continuous.max`: pointwise `min`/`max` of two continuous functions is continuous. * `Tendsto.min`, `Tendsto.max` : if `f` tends to `a` and `g` tends to `b`, then their pointwise `min`/`max` tend to `min a b` and `max a b`, respectively. * `tendsto_of_tendsto_of_tendsto_of_le_of_le` : theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; if `g` and `h` both converge to `a`, and eventually `g x ≤ f x ≤ h x`, then `f` converges to `a`. ## Implementation notes We do _not_ register the order topology as an instance on a preorder (or even on a linear order). Indeed, on many such spaces, a topology has already been constructed in a different way (think of the discrete spaces `ℕ` or `ℤ`, or `ℝ` that could inherit a topology as the completion of `ℚ`), and is in general not defeq to the one generated by the intervals. We make it available as a definition `Preorder.topology α` though, that can be registered as an instance when necessary, or for specific types. -/ open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) universe u v w variable {α : Type u} {β : Type v} {γ : Type w} /-- If `α` is a topological space and a preorder, `ClosedIicTopology α` means that `Iic a` is closed for all `a : α`. -/ class ClosedIicTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | b ≤ a}` is closed. -/ isClosed_le' (a : α) : IsClosed { b : α | b ≤ a } export ClosedIicTopology (isClosed_le') #align is_closed_le' ClosedIicTopology.isClosed_le' /-- If `α` is a topological space and a preorder, `ClosedIciTopology α` means that `Ici a` is closed for all `a : α`. -/ class ClosedIciTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | a ≤ b}` is closed. -/ isClosed_ge' (a : α) : IsClosed { b : α | a ≤ b } export ClosedIciTopology (isClosed_ge') #align is_closed_ge' ClosedIciTopology.isClosed_ge' /-- A topology on a set which is both a topological space and a preorder is _order-closed_ if the set of points `(x, y)` with `x ≤ y` is closed in the product space. We introduce this as a mixin. This property is satisfied for the order topology on a linear order, but it can be satisfied more generally, and suffices to derive many interesting properties relating order and topology. -/ class OrderClosedTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- The set `{ (x, y) | x ≤ y }` is a closed set. -/ isClosed_le' : IsClosed { p : α × α | p.1 ≤ p.2 } #align order_closed_topology OrderClosedTopology instance [TopologicalSpace α] [h : FirstCountableTopology α] : FirstCountableTopology αᵒᵈ := h instance [TopologicalSpace α] [h : SecondCountableTopology α] : SecondCountableTopology αᵒᵈ := h theorem Dense.orderDual [TopologicalSpace α] {s : Set α} (hs : Dense s) : Dense (OrderDual.ofDual ⁻¹' s) := hs #align dense.order_dual Dense.orderDual section ClosedIicTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIicTopology α] instance : ClosedIciTopology αᵒᵈ where isClosed_ge' a := isClosed_le' (α := α) a theorem isClosed_Iic {a : α} : IsClosed (Iic a) := isClosed_le' a #align is_closed_Iic isClosed_Iic @[simp] theorem closure_Iic (a : α) : closure (Iic a) = Iic a := isClosed_Iic.closure_eq #align closure_Iic closure_Iic theorem le_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, f c ≤ b) : a ≤ b := (isClosed_le' b).mem_of_tendsto lim h #align le_of_tendsto le_of_tendsto theorem le_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, f c ≤ b) : a ≤ b := le_of_tendsto lim (eventually_of_forall h) #align le_of_tendsto' le_of_tendsto' end ClosedIicTopology section ClosedIciTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIciTopology α] instance : ClosedIicTopology αᵒᵈ where isClosed_le' a := isClosed_ge' (α := α) a theorem isClosed_Ici {a : α} : IsClosed (Ici a) := isClosed_ge' a #align is_closed_Ici isClosed_Ici @[simp] theorem closure_Ici (a : α) : closure (Ici a) = Ici a := isClosed_Ici.closure_eq #align closure_Ici closure_Ici theorem ge_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, b ≤ f c) : b ≤ a := (isClosed_ge' b).mem_of_tendsto lim h #align ge_of_tendsto ge_of_tendsto theorem ge_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, b ≤ f c) : b ≤ a := ge_of_tendsto lim (eventually_of_forall h) #align ge_of_tendsto' ge_of_tendsto' end ClosedIciTopology section OrderClosedTopology section Preorder variable [TopologicalSpace α] [Preorder α] [t : OrderClosedTopology α] namespace Subtype -- todo: add `OrderEmbedding.orderClosedTopology` instance {p : α → Prop} : OrderClosedTopology (Subtype p) := have this : Continuous fun p : Subtype p × Subtype p => ((p.fst : α), (p.snd : α)) := continuous_subtype_val.prod_map continuous_subtype_val OrderClosedTopology.mk (t.isClosed_le'.preimage this) end Subtype theorem isClosed_le_prod : IsClosed { p : α × α | p.1 ≤ p.2 } := t.isClosed_le' #align is_closed_le_prod isClosed_le_prod theorem isClosed_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsClosed { b | f b ≤ g b } := continuous_iff_isClosed.mp (hf.prod_mk hg) _ isClosed_le_prod #align is_closed_le isClosed_le instance : ClosedIicTopology α where isClosed_le' _ := isClosed_le continuous_id continuous_const instance : ClosedIciTopology α where isClosed_ge' _ := isClosed_le continuous_const continuous_id instance : OrderClosedTopology αᵒᵈ := ⟨(OrderClosedTopology.isClosed_le' (α := α)).preimage continuous_swap⟩ theorem isClosed_Icc {a b : α} : IsClosed (Icc a b) := IsClosed.inter isClosed_Ici isClosed_Iic #align is_closed_Icc isClosed_Icc @[simp] theorem closure_Icc (a b : α) : closure (Icc a b) = Icc a b := isClosed_Icc.closure_eq #align closure_Icc closure_Icc theorem le_of_tendsto_of_tendsto {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : f ≤ᶠ[b] g) : a₁ ≤ a₂ := have : Tendsto (fun b => (f b, g b)) b (𝓝 (a₁, a₂)) := hf.prod_mk_nhds hg show (a₁, a₂) ∈ { p : α × α | p.1 ≤ p.2 } from t.isClosed_le'.mem_of_tendsto this h #align le_of_tendsto_of_tendsto le_of_tendsto_of_tendsto alias tendsto_le_of_eventuallyLE := le_of_tendsto_of_tendsto #align tendsto_le_of_eventually_le tendsto_le_of_eventuallyLE theorem le_of_tendsto_of_tendsto' {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : ∀ x, f x ≤ g x) : a₁ ≤ a₂ := le_of_tendsto_of_tendsto hf hg (eventually_of_forall h) #align le_of_tendsto_of_tendsto' le_of_tendsto_of_tendsto' @[simp] theorem closure_le_eq [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b ≤ g b } = { b | f b ≤ g b } := (isClosed_le hf hg).closure_eq #align closure_le_eq closure_le_eq theorem closure_lt_subset_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b < g b } ⊆ { b | f b ≤ g b } := (closure_minimal fun _ => le_of_lt) <| isClosed_le hf hg #align closure_lt_subset_le closure_lt_subset_le theorem ContinuousWithinAt.closure_le [TopologicalSpace β] {f g : β → α} {s : Set β} {x : β} (hx : x ∈ closure s) (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) (h : ∀ y ∈ s, f y ≤ g y) : f x ≤ g x := show (f x, g x) ∈ { p : α × α | p.1 ≤ p.2 } from OrderClosedTopology.isClosed_le'.closure_subset ((hf.prod hg).mem_closure hx h) #align continuous_within_at.closure_le ContinuousWithinAt.closure_le /-- If `s` is a closed set and two functions `f` and `g` are continuous on `s`, then the set `{x ∈ s | f x ≤ g x}` is a closed set. -/ theorem IsClosed.isClosed_le [TopologicalSpace β] {f g : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) (hg : ContinuousOn g s) : IsClosed ({ x ∈ s | f x ≤ g x }) := (hf.prod hg).preimage_isClosed_of_isClosed hs OrderClosedTopology.isClosed_le' #align is_closed.is_closed_le IsClosed.isClosed_le theorem le_on_closure [TopologicalSpace β] {f g : β → α} {s : Set β} (h : ∀ x ∈ s, f x ≤ g x) (hf : ContinuousOn f (closure s)) (hg : ContinuousOn g (closure s)) ⦃x⦄ (hx : x ∈ closure s) : f x ≤ g x := have : s ⊆ { y ∈ closure s | f y ≤ g y } := fun y hy => ⟨subset_closure hy, h y hy⟩ (closure_minimal this (isClosed_closure.isClosed_le hf hg) hx).2 #align le_on_closure le_on_closure theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 } := (hs.preimage continuous_fst).isClosed_le (hf.comp continuousOn_fst Subset.rfl) continuousOn_snd #align is_closed.epigraph IsClosed.epigraph theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ p.2 ≤ f p.1 } := (hs.preimage continuous_fst).isClosed_le continuousOn_snd (hf.comp continuousOn_fst Subset.rfl) #align is_closed.hypograph IsClosed.hypograph end Preorder section PartialOrder variable [TopologicalSpace α] [PartialOrder α] [t : OrderClosedTopology α] -- see Note [lower instance priority] instance (priority := 90) OrderClosedTopology.to_t2Space : T2Space α := t2_iff_isClosed_diagonal.2 <| by simpa only [diagonal, le_antisymm_iff] using t.isClosed_le'.inter (isClosed_le continuous_snd continuous_fst) #align order_closed_topology.to_t2_space OrderClosedTopology.to_t2Space end PartialOrder section LinearOrder variable [TopologicalSpace α] [LinearOrder α] [OrderClosedTopology α] theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsOpen { b | f b < g b } := by simpa only [lt_iff_not_le] using (isClosed_le hg hf).isOpen_compl #align is_open_lt isOpen_lt theorem isOpen_lt_prod : IsOpen { p : α × α | p.1 < p.2 } := isOpen_lt continuous_fst continuous_snd #align is_open_lt_prod isOpen_lt_prod variable {a b : α} theorem isOpen_Iio : IsOpen (Iio a) := isOpen_lt continuous_id continuous_const #align is_open_Iio isOpen_Iio theorem isOpen_Ioi : IsOpen (Ioi a) := isOpen_lt continuous_const continuous_id #align is_open_Ioi isOpen_Ioi theorem isOpen_Ioo : IsOpen (Ioo a b) := IsOpen.inter isOpen_Ioi isOpen_Iio #align is_open_Ioo isOpen_Ioo @[simp] theorem interior_Ioi : interior (Ioi a) = Ioi a := isOpen_Ioi.interior_eq #align interior_Ioi interior_Ioi @[simp] theorem interior_Iio : interior (Iio a) = Iio a := isOpen_Iio.interior_eq #align interior_Iio interior_Iio @[simp] theorem interior_Ioo : interior (Ioo a b) = Ioo a b := isOpen_Ioo.interior_eq #align interior_Ioo interior_Ioo theorem Ioo_subset_closure_interior : Ioo a b ⊆ closure (interior (Ioo a b)) := by
simp only [interior_Ioo, subset_closure]
theorem Ioo_subset_closure_interior : Ioo a b ⊆ closure (interior (Ioo a b)) := by
Mathlib.Topology.Order.Basic.336_0.Npdof1X5b8sCkZ2
theorem Ioo_subset_closure_interior : Ioo a b ⊆ closure (interior (Ioo a b))
Mathlib_Topology_Order_Basic
α : Type u β : Type v γ : Type w inst✝³ : TopologicalSpace α inst✝² : LinearOrder α inst✝¹ : OrderClosedTopology α a✝ b✝ : α inst✝ : TopologicalSpace γ a b c : α H : b ∈ Ico a c ⊢ Iio c ∩ Ioi b ⊆ Ioo a c
/- Copyright (c) 2017 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl, Mario Carneiro, Yury Kudryashov -/ import Mathlib.Data.Set.Intervals.Pi import Mathlib.Data.Set.Pointwise.Interval import Mathlib.Order.Filter.Interval import Mathlib.Tactic.TFAE import Mathlib.Topology.Support import Mathlib.Topology.Algebra.Order.LeftRight #align_import topology.order.basic from "leanprover-community/mathlib"@"3efd324a3a31eaa40c9d5bfc669c4fafee5f9423" /-! # Theory of topology on ordered spaces ## Main definitions The order topology on an ordered space is the topology generated by all open intervals (or equivalently by those of the form `(-∞, a)` and `(b, +∞)`). We define it as `Preorder.topology α`. However, we do *not* register it as an instance (as many existing ordered types already have topologies, which would be equal but not definitionally equal to `Preorder.topology α`). Instead, we introduce a class `OrderTopology α` (which is a `Prop`, also known as a mixin) saying that on the type `α` having already a topological space structure and a preorder structure, the topological structure is equal to the order topology. We also introduce another (mixin) class `OrderClosedTopology α` saying that the set of points `(x, y)` with `x ≤ y` is closed in the product space. This is automatically satisfied on a linear order with the order topology. We prove many basic properties of such topologies. ## Main statements This file contains the proofs of the following facts. For exact requirements (`OrderClosedTopology` vs `OrderTopology`, `Preorder` vs `PartialOrder` vs `LinearOrder` etc) see their statements. ### Open / closed sets * `isOpen_lt` : if `f` and `g` are continuous functions, then `{x | f x < g x}` is open; * `isOpen_Iio`, `isOpen_Ioi`, `isOpen_Ioo` : open intervals are open; * `isClosed_le` : if `f` and `g` are continuous functions, then `{x | f x ≤ g x}` is closed; * `isClosed_Iic`, `isClosed_Ici`, `isClosed_Icc` : closed intervals are closed; * `frontier_le_subset_eq`, `frontier_lt_subset_eq` : frontiers of both `{x | f x ≤ g x}` and `{x | f x < g x}` are included by `{x | f x = g x}`; * `exists_Ioc_subset_of_mem_nhds`, `exists_Ico_subset_of_mem_nhds` : if `x < y`, then any neighborhood of `x` includes an interval `[x, z)` for some `z ∈ (x, y]`, and any neighborhood of `y` includes an interval `(z, y]` for some `z ∈ [x, y)`. ### Convergence and inequalities * `le_of_tendsto_of_tendsto` : if `f` converges to `a`, `g` converges to `b`, and eventually `f x ≤ g x`, then `a ≤ b` * `le_of_tendsto`, `ge_of_tendsto` : if `f` converges to `a` and eventually `f x ≤ b` (resp., `b ≤ f x`), then `a ≤ b` (resp., `b ≤ a`); we also provide primed versions that assume the inequalities to hold for all `x`. ### Min, max, `sSup` and `sInf` * `Continuous.min`, `Continuous.max`: pointwise `min`/`max` of two continuous functions is continuous. * `Tendsto.min`, `Tendsto.max` : if `f` tends to `a` and `g` tends to `b`, then their pointwise `min`/`max` tend to `min a b` and `max a b`, respectively. * `tendsto_of_tendsto_of_tendsto_of_le_of_le` : theorem known as squeeze theorem, sandwich theorem, theorem of Carabinieri, and two policemen (and a drunk) theorem; if `g` and `h` both converge to `a`, and eventually `g x ≤ f x ≤ h x`, then `f` converges to `a`. ## Implementation notes We do _not_ register the order topology as an instance on a preorder (or even on a linear order). Indeed, on many such spaces, a topology has already been constructed in a different way (think of the discrete spaces `ℕ` or `ℤ`, or `ℝ` that could inherit a topology as the completion of `ℚ`), and is in general not defeq to the one generated by the intervals. We make it available as a definition `Preorder.topology α` though, that can be registered as an instance when necessary, or for specific types. -/ open Set Filter TopologicalSpace Topology Function open OrderDual (toDual ofDual) universe u v w variable {α : Type u} {β : Type v} {γ : Type w} /-- If `α` is a topological space and a preorder, `ClosedIicTopology α` means that `Iic a` is closed for all `a : α`. -/ class ClosedIicTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | b ≤ a}` is closed. -/ isClosed_le' (a : α) : IsClosed { b : α | b ≤ a } export ClosedIicTopology (isClosed_le') #align is_closed_le' ClosedIicTopology.isClosed_le' /-- If `α` is a topological space and a preorder, `ClosedIciTopology α` means that `Ici a` is closed for all `a : α`. -/ class ClosedIciTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- For any `a`, the set `{b | a ≤ b}` is closed. -/ isClosed_ge' (a : α) : IsClosed { b : α | a ≤ b } export ClosedIciTopology (isClosed_ge') #align is_closed_ge' ClosedIciTopology.isClosed_ge' /-- A topology on a set which is both a topological space and a preorder is _order-closed_ if the set of points `(x, y)` with `x ≤ y` is closed in the product space. We introduce this as a mixin. This property is satisfied for the order topology on a linear order, but it can be satisfied more generally, and suffices to derive many interesting properties relating order and topology. -/ class OrderClosedTopology (α : Type*) [TopologicalSpace α] [Preorder α] : Prop where /-- The set `{ (x, y) | x ≤ y }` is a closed set. -/ isClosed_le' : IsClosed { p : α × α | p.1 ≤ p.2 } #align order_closed_topology OrderClosedTopology instance [TopologicalSpace α] [h : FirstCountableTopology α] : FirstCountableTopology αᵒᵈ := h instance [TopologicalSpace α] [h : SecondCountableTopology α] : SecondCountableTopology αᵒᵈ := h theorem Dense.orderDual [TopologicalSpace α] {s : Set α} (hs : Dense s) : Dense (OrderDual.ofDual ⁻¹' s) := hs #align dense.order_dual Dense.orderDual section ClosedIicTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIicTopology α] instance : ClosedIciTopology αᵒᵈ where isClosed_ge' a := isClosed_le' (α := α) a theorem isClosed_Iic {a : α} : IsClosed (Iic a) := isClosed_le' a #align is_closed_Iic isClosed_Iic @[simp] theorem closure_Iic (a : α) : closure (Iic a) = Iic a := isClosed_Iic.closure_eq #align closure_Iic closure_Iic theorem le_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, f c ≤ b) : a ≤ b := (isClosed_le' b).mem_of_tendsto lim h #align le_of_tendsto le_of_tendsto theorem le_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, f c ≤ b) : a ≤ b := le_of_tendsto lim (eventually_of_forall h) #align le_of_tendsto' le_of_tendsto' end ClosedIicTopology section ClosedIciTopology variable [TopologicalSpace α] [Preorder α] [t : ClosedIciTopology α] instance : ClosedIicTopology αᵒᵈ where isClosed_le' a := isClosed_ge' (α := α) a theorem isClosed_Ici {a : α} : IsClosed (Ici a) := isClosed_ge' a #align is_closed_Ici isClosed_Ici @[simp] theorem closure_Ici (a : α) : closure (Ici a) = Ici a := isClosed_Ici.closure_eq #align closure_Ici closure_Ici theorem ge_of_tendsto {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ᶠ c in x, b ≤ f c) : b ≤ a := (isClosed_ge' b).mem_of_tendsto lim h #align ge_of_tendsto ge_of_tendsto theorem ge_of_tendsto' {f : β → α} {a b : α} {x : Filter β} [NeBot x] (lim : Tendsto f x (𝓝 a)) (h : ∀ c, b ≤ f c) : b ≤ a := ge_of_tendsto lim (eventually_of_forall h) #align ge_of_tendsto' ge_of_tendsto' end ClosedIciTopology section OrderClosedTopology section Preorder variable [TopologicalSpace α] [Preorder α] [t : OrderClosedTopology α] namespace Subtype -- todo: add `OrderEmbedding.orderClosedTopology` instance {p : α → Prop} : OrderClosedTopology (Subtype p) := have this : Continuous fun p : Subtype p × Subtype p => ((p.fst : α), (p.snd : α)) := continuous_subtype_val.prod_map continuous_subtype_val OrderClosedTopology.mk (t.isClosed_le'.preimage this) end Subtype theorem isClosed_le_prod : IsClosed { p : α × α | p.1 ≤ p.2 } := t.isClosed_le' #align is_closed_le_prod isClosed_le_prod theorem isClosed_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsClosed { b | f b ≤ g b } := continuous_iff_isClosed.mp (hf.prod_mk hg) _ isClosed_le_prod #align is_closed_le isClosed_le instance : ClosedIicTopology α where isClosed_le' _ := isClosed_le continuous_id continuous_const instance : ClosedIciTopology α where isClosed_ge' _ := isClosed_le continuous_const continuous_id instance : OrderClosedTopology αᵒᵈ := ⟨(OrderClosedTopology.isClosed_le' (α := α)).preimage continuous_swap⟩ theorem isClosed_Icc {a b : α} : IsClosed (Icc a b) := IsClosed.inter isClosed_Ici isClosed_Iic #align is_closed_Icc isClosed_Icc @[simp] theorem closure_Icc (a b : α) : closure (Icc a b) = Icc a b := isClosed_Icc.closure_eq #align closure_Icc closure_Icc theorem le_of_tendsto_of_tendsto {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : f ≤ᶠ[b] g) : a₁ ≤ a₂ := have : Tendsto (fun b => (f b, g b)) b (𝓝 (a₁, a₂)) := hf.prod_mk_nhds hg show (a₁, a₂) ∈ { p : α × α | p.1 ≤ p.2 } from t.isClosed_le'.mem_of_tendsto this h #align le_of_tendsto_of_tendsto le_of_tendsto_of_tendsto alias tendsto_le_of_eventuallyLE := le_of_tendsto_of_tendsto #align tendsto_le_of_eventually_le tendsto_le_of_eventuallyLE theorem le_of_tendsto_of_tendsto' {f g : β → α} {b : Filter β} {a₁ a₂ : α} [NeBot b] (hf : Tendsto f b (𝓝 a₁)) (hg : Tendsto g b (𝓝 a₂)) (h : ∀ x, f x ≤ g x) : a₁ ≤ a₂ := le_of_tendsto_of_tendsto hf hg (eventually_of_forall h) #align le_of_tendsto_of_tendsto' le_of_tendsto_of_tendsto' @[simp] theorem closure_le_eq [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b ≤ g b } = { b | f b ≤ g b } := (isClosed_le hf hg).closure_eq #align closure_le_eq closure_le_eq theorem closure_lt_subset_le [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : closure { b | f b < g b } ⊆ { b | f b ≤ g b } := (closure_minimal fun _ => le_of_lt) <| isClosed_le hf hg #align closure_lt_subset_le closure_lt_subset_le theorem ContinuousWithinAt.closure_le [TopologicalSpace β] {f g : β → α} {s : Set β} {x : β} (hx : x ∈ closure s) (hf : ContinuousWithinAt f s x) (hg : ContinuousWithinAt g s x) (h : ∀ y ∈ s, f y ≤ g y) : f x ≤ g x := show (f x, g x) ∈ { p : α × α | p.1 ≤ p.2 } from OrderClosedTopology.isClosed_le'.closure_subset ((hf.prod hg).mem_closure hx h) #align continuous_within_at.closure_le ContinuousWithinAt.closure_le /-- If `s` is a closed set and two functions `f` and `g` are continuous on `s`, then the set `{x ∈ s | f x ≤ g x}` is a closed set. -/ theorem IsClosed.isClosed_le [TopologicalSpace β] {f g : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) (hg : ContinuousOn g s) : IsClosed ({ x ∈ s | f x ≤ g x }) := (hf.prod hg).preimage_isClosed_of_isClosed hs OrderClosedTopology.isClosed_le' #align is_closed.is_closed_le IsClosed.isClosed_le theorem le_on_closure [TopologicalSpace β] {f g : β → α} {s : Set β} (h : ∀ x ∈ s, f x ≤ g x) (hf : ContinuousOn f (closure s)) (hg : ContinuousOn g (closure s)) ⦃x⦄ (hx : x ∈ closure s) : f x ≤ g x := have : s ⊆ { y ∈ closure s | f y ≤ g y } := fun y hy => ⟨subset_closure hy, h y hy⟩ (closure_minimal this (isClosed_closure.isClosed_le hf hg) hx).2 #align le_on_closure le_on_closure theorem IsClosed.epigraph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ f p.1 ≤ p.2 } := (hs.preimage continuous_fst).isClosed_le (hf.comp continuousOn_fst Subset.rfl) continuousOn_snd #align is_closed.epigraph IsClosed.epigraph theorem IsClosed.hypograph [TopologicalSpace β] {f : β → α} {s : Set β} (hs : IsClosed s) (hf : ContinuousOn f s) : IsClosed { p : β × α | p.1 ∈ s ∧ p.2 ≤ f p.1 } := (hs.preimage continuous_fst).isClosed_le continuousOn_snd (hf.comp continuousOn_fst Subset.rfl) #align is_closed.hypograph IsClosed.hypograph end Preorder section PartialOrder variable [TopologicalSpace α] [PartialOrder α] [t : OrderClosedTopology α] -- see Note [lower instance priority] instance (priority := 90) OrderClosedTopology.to_t2Space : T2Space α := t2_iff_isClosed_diagonal.2 <| by simpa only [diagonal, le_antisymm_iff] using t.isClosed_le'.inter (isClosed_le continuous_snd continuous_fst) #align order_closed_topology.to_t2_space OrderClosedTopology.to_t2Space end PartialOrder section LinearOrder variable [TopologicalSpace α] [LinearOrder α] [OrderClosedTopology α] theorem isOpen_lt [TopologicalSpace β] {f g : β → α} (hf : Continuous f) (hg : Continuous g) : IsOpen { b | f b < g b } := by simpa only [lt_iff_not_le] using (isClosed_le hg hf).isOpen_compl #align is_open_lt isOpen_lt theorem isOpen_lt_prod : IsOpen { p : α × α | p.1 < p.2 } := isOpen_lt continuous_fst continuous_snd #align is_open_lt_prod isOpen_lt_prod variable {a b : α} theorem isOpen_Iio : IsOpen (Iio a) := isOpen_lt continuous_id continuous_const #align is_open_Iio isOpen_Iio theorem isOpen_Ioi : IsOpen (Ioi a) := isOpen_lt continuous_const continuous_id #align is_open_Ioi isOpen_Ioi theorem isOpen_Ioo : IsOpen (Ioo a b) := IsOpen.inter isOpen_Ioi isOpen_Iio #align is_open_Ioo isOpen_Ioo @[simp] theorem interior_Ioi : interior (Ioi a) = Ioi a := isOpen_Ioi.interior_eq #align interior_Ioi interior_Ioi @[simp] theorem interior_Iio : interior (Iio a) = Iio a := isOpen_Iio.interior_eq #align interior_Iio interior_Iio @[simp] theorem interior_Ioo : interior (Ioo a b) = Ioo a b := isOpen_Ioo.interior_eq #align interior_Ioo interior_Ioo theorem Ioo_subset_closure_interior : Ioo a b ⊆ closure (interior (Ioo a b)) := by simp only [interior_Ioo, subset_closure] #align Ioo_subset_closure_interior Ioo_subset_closure_interior theorem Iio_mem_nhds {a b : α} (h : a < b) : Iio b ∈ 𝓝 a := IsOpen.mem_nhds isOpen_Iio h #align Iio_mem_nhds Iio_mem_nhds theorem Ioi_mem_nhds {a b : α} (h : a < b) : Ioi a ∈ 𝓝 b := IsOpen.mem_nhds isOpen_Ioi h #align Ioi_mem_nhds Ioi_mem_nhds theorem Iic_mem_nhds {a b : α} (h : a < b) : Iic b ∈ 𝓝 a := mem_of_superset (Iio_mem_nhds h) Iio_subset_Iic_self #align Iic_mem_nhds Iic_mem_nhds theorem Ici_mem_nhds {a b : α} (h : a < b) : Ici a ∈ 𝓝 b := mem_of_superset (Ioi_mem_nhds h) Ioi_subset_Ici_self #align Ici_mem_nhds Ici_mem_nhds theorem Ioo_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Ioo a b ∈ 𝓝 x := IsOpen.mem_nhds isOpen_Ioo ⟨ha, hb⟩ #align Ioo_mem_nhds Ioo_mem_nhds theorem Ioc_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Ioc a b ∈ 𝓝 x := mem_of_superset (Ioo_mem_nhds ha hb) Ioo_subset_Ioc_self #align Ioc_mem_nhds Ioc_mem_nhds theorem Ico_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Ico a b ∈ 𝓝 x := mem_of_superset (Ioo_mem_nhds ha hb) Ioo_subset_Ico_self #align Ico_mem_nhds Ico_mem_nhds theorem Icc_mem_nhds {a b x : α} (ha : a < x) (hb : x < b) : Icc a b ∈ 𝓝 x := mem_of_superset (Ioo_mem_nhds ha hb) Ioo_subset_Icc_self #align Icc_mem_nhds Icc_mem_nhds theorem eventually_lt_of_tendsto_lt {l : Filter γ} {f : γ → α} {u v : α} (hv : v < u) (h : Filter.Tendsto f l (𝓝 v)) : ∀ᶠ a in l, f a < u := tendsto_nhds.1 h (· < u) isOpen_Iio hv #align eventually_lt_of_tendsto_lt eventually_lt_of_tendsto_lt theorem eventually_gt_of_tendsto_gt {l : Filter γ} {f : γ → α} {u v : α} (hv : u < v) (h : Filter.Tendsto f l (𝓝 v)) : ∀ᶠ a in l, u < f a := tendsto_nhds.1 h (· > u) isOpen_Ioi hv #align eventually_gt_of_tendsto_gt eventually_gt_of_tendsto_gt theorem eventually_le_of_tendsto_lt {l : Filter γ} {f : γ → α} {u v : α} (hv : v < u) (h : Tendsto f l (𝓝 v)) : ∀ᶠ a in l, f a ≤ u := (eventually_lt_of_tendsto_lt hv h).mono fun _ => le_of_lt #align eventually_le_of_tendsto_lt eventually_le_of_tendsto_lt theorem eventually_ge_of_tendsto_gt {l : Filter γ} {f : γ → α} {u v : α} (hv : u < v) (h : Tendsto f l (𝓝 v)) : ∀ᶠ a in l, u ≤ f a := (eventually_gt_of_tendsto_gt hv h).mono fun _ => le_of_lt #align eventually_ge_of_tendsto_gt eventually_ge_of_tendsto_gt variable [TopologicalSpace γ] /-! ### Neighborhoods to the left and to the right on an `OrderClosedTopology` Limits to the left and to the right of real functions are defined in terms of neighborhoods to the left and to the right, either open or closed, i.e., members of `𝓝[>] a` and `𝓝[≥] a` on the right, and similarly on the left. Here we simply prove that all right-neighborhoods of a point are equal, and we'll prove later other useful characterizations which require the stronger hypothesis `OrderTopology α` -/ /-! #### Right neighborhoods, point excluded -/ theorem Ioo_mem_nhdsWithin_Ioi {a b c : α} (H : b ∈ Ico a c) : Ioo a c ∈ 𝓝[>] b := mem_nhdsWithin.2 ⟨Iio c, isOpen_Iio, H.2, by
rw [inter_comm, Ioi_inter_Iio]
theorem Ioo_mem_nhdsWithin_Ioi {a b c : α} (H : b ∈ Ico a c) : Ioo a c ∈ 𝓝[>] b := mem_nhdsWithin.2 ⟨Iio c, isOpen_Iio, H.2, by
Mathlib.Topology.Order.Basic.408_0.Npdof1X5b8sCkZ2
theorem Ioo_mem_nhdsWithin_Ioi {a b c : α} (H : b ∈ Ico a c) : Ioo a c ∈ 𝓝[>] b
Mathlib_Topology_Order_Basic