Skip to content

Commit

Permalink
feat(analysis/complex): equiv_real_prod_symm_apply (#15122)
Browse files Browse the repository at this point in the history
Plus some minor lemmas for #15106.
  • Loading branch information
sgouezel committed Jul 5, 2022
1 parent 68ae182 commit db9cb46
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/analysis/special_functions/complex/arg.lean
Expand Up @@ -206,6 +206,9 @@ begin
rw [← arg_neg_one, ← arg_real_mul (-1) (neg_pos.2 h)], simp [← of_real_def] }
end

lemma arg_lt_pi_iff {z : ℂ} : arg z < π ↔ 0 ≤ z.re ∨ z.im ≠ 0 :=
by rw [(arg_le_pi z).lt_iff_ne, not_iff_comm, not_or_distrib, not_le, not_not, arg_eq_pi_iff]

lemma arg_of_real_of_neg {x : ℝ} (hx : x < 0) : arg x = π :=
arg_eq_pi_iff.2 ⟨hx, rfl⟩

Expand Down
9 changes: 9 additions & 0 deletions src/analysis/special_functions/pow.lean
Expand Up @@ -824,6 +824,15 @@ lemma continuous_at_rpow (p : ℝ × ℝ) (h : p.1 ≠ 0 ∨ 0 < p.2) :
continuous_at (λ p : ℝ × ℝ, p.1 ^ p.2) p :=
h.elim (λ h, continuous_at_rpow_of_ne p h) (λ h, continuous_at_rpow_of_pos p h)

lemma continuous_at_rpow_const (x : ℝ) (q : ℝ) (h : x ≠ 00 < q) :
continuous_at (λ (x : ℝ), x ^ q) x :=
begin
change continuous_at ((λ p : ℝ × ℝ, p.1 ^ p.2) ∘ (λ y : ℝ, (y, q))) x,
apply continuous_at.comp,
{ exact continuous_at_rpow (x, q) h },
{ exact (continuous_id'.prod_mk continuous_const).continuous_at }
end

end real

section
Expand Down
7 changes: 6 additions & 1 deletion src/data/complex/basic.lean
Expand Up @@ -31,7 +31,8 @@ open_locale complex_conjugate
noncomputable instance : decidable_eq ℂ := classical.dec_eq _

/-- The equivalence between the complex numbers and `ℝ × ℝ`. -/
@[simps] def equiv_real_prod : ℂ ≃ (ℝ × ℝ) :=
@[simps apply]
def equiv_real_prod : ℂ ≃ (ℝ × ℝ) :=
{ to_fun := λ z, ⟨z.re, z.im⟩,
inv_fun := λ p, ⟨p.1, p.2⟩,
left_inv := λ ⟨x, y⟩, rfl,
Expand Down Expand Up @@ -160,6 +161,10 @@ lemma mul_I_im (z : ℂ) : (z * I).im = z.re := by simp
lemma I_mul_re (z : ℂ) : (I * z).re = -z.im := by simp
lemma I_mul_im (z : ℂ) : (I * z).im = z.re := by simp

@[simp] lemma equiv_real_prod_symm_apply (p : ℝ × ℝ) :
equiv_real_prod.symm p = p.1 + p.2 * I :=
by { ext; simp [equiv_real_prod] }

/-! ### Commutative ring instance and lemmas -/

/- We use a nonstandard formula for the `ℕ` and `ℤ` actions to make sure there is no
Expand Down
4 changes: 4 additions & 0 deletions src/topology/separation.lean
Expand Up @@ -1049,6 +1049,10 @@ lemma is_closed_eq [t2_space α] {f g : β → α}
(hf : continuous f) (hg : continuous g) : is_closed {x:β | f x = g x} :=
continuous_iff_is_closed.mp (hf.prod_mk hg) _ is_closed_diagonal

lemma is_open_ne_fun [t2_space α] {f g : β → α}
(hf : continuous f) (hg : continuous g) : is_open {x:β | f x ≠ g x} :=
is_open_compl_iff.mpr $ is_closed_eq hf hg

/-- If two continuous maps are equal on `s`, then they are equal on the closure of `s`. See also
`set.eq_on.of_subset_closure` for a more general version. -/
lemma set.eq_on.closure [t2_space α] {s : set β} {f g : β → α} (h : eq_on f g s)
Expand Down

0 comments on commit db9cb46

Please sign in to comment.