AFTD Auto-Formalizing Theoretical Domains

LinearPMap.exists_phase_add_im_eq_zero

theoremverifiedformalizationimported Lean

LinearPMap.exists_phase_add_im_eq_zero

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] in
open Submodule in
open Metric in
open InnerProductSpace in
open Complex in
open ComplexConjugate in
open Set in
open Pointwise in
lemma LinearPMap.exists_phase_add_im_eq_zero (z₁ z₂ : ℂ) :
    ∃ θ : ℝ, (exp (I * θ) * z₁ + exp (-I * θ) * z₂).im = 0
Formalizes
Physlib, `LinearPMap.exists_phase_add_im_eq_zero`
Lean proof
By Gregory J. Loges, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2026 Gregory J. Loges. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
10 Oct 2026
Axioms
Classical.choiceQuot.soundpropext

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] inopen Submodule inopen Metric inopen InnerProductSpace inopen Complex inopen ComplexConjugate inopen Set inopen Pointwise inlemma LinearPMap.exists_phase_add_im_eq_zero (z₁ z₂ : ℂ) :    ∃ θ : ℝ, (exp (I * θ) * z₁ + exp (-I * θ) * z₂).im = 0 := by  let g : ℝ → ℝ := fun θ ↦ (exp (I * θ) * z₁ + exp (-I * θ) * z₂).im  have hg : g Real.pi = -g 0 := by simp [g, mul_comm I, exp_neg, add_comm]  have hmem : (0 : ℝ) ∈ Set.uIcc (g 0) (g Real.pi) := by    rw [hg]    rcases le_total (g 0) 0 with h | h    exacts [Set.mem_uIcc.mpr (.inl ⟨h, by linarith⟩), Set.mem_uIcc.mpr (.inr ⟨by linarith, h⟩)]  obtain ⟨θ, -, hθ⟩ := intermediate_value_uIcc (by fun_prop : Continuous g).continuousOn hmem  exact ⟨θ, hθ⟩
See it in the graphDiscuss this resultChallenge it