Documentation

LeanPool.ComputableReal.IsComputableC

Interval approximations for complex numbers #

IsComputableℂ x packages IsComputable approximations for the real and imaginary parts of a complex number x, and is closed under the field operations, powers, conjugation, norm and inner product. This also provides DecidableEq and (with ComplexOrder) Decidable comparison instances; like their real counterparts, these comparison instances are classical and noncomputable.

class IsComputableℂ (x : ) :

Type class stating that x : ℂ has a ComputableℝSeq for its real and imaginary parts. Note that we can't define this as IsComputable x.re + IsComputable x.im, because then (if x is a noncomputable expression) this will be a noncomputable expression.

  • An interval-approximation witness for the real part.

  • An interval-approximation witness for the imaginary part.

Instances
    @[reducible]
    def IsComputableℂ.liftEq {x y : } (h : x = y) [hx : IsComputableℂ x] :

    Turns one IsComputableℂ into another one, given a proof that they're equal. This is directly analogous to decidable_of_iff, as a way to avoid Eq.rec on data-carrying instances.

    Equations
    Instances For
      @[implicit_reducible]
      instance IsComputableℂ.instComputableRI (r : ) [hr : IsComputable r] {i : } [hi : IsComputable i] :
      IsComputableℂ { re := r, im := i }
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableRat (q : ) :
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableDiv (x y : ) [hx : IsComputableℂ x] [hy : IsComputableℂ y] :
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableZPow (x : ) [hx : IsComputableℂ x] (z : ) :
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableNSMul (x : ) [hx : IsComputableℂ x] (n : ) :
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableZSMul (x : ) [hx : IsComputableℂ x] (z : ) :
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableQSMul (x : ) [hx : IsComputableℂ x] (q : ) :
      Equations
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instComputableInner (x y : ) [hx : IsComputableℂ x] [hy : IsComputableℂ y] :
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instDecidableEq (x y : ) [hx : IsComputableℂ x] [hy : IsComputableℂ y] :
      Decidable (x = y)
      Equations
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instDecidableLE (x y : ) [hx : IsComputableℂ x] [hy : IsComputableℂ y] :
      Equations
      @[implicit_reducible]
      noncomputable instance IsComputableℂ.instDecidableLT (x y : ) [hx : IsComputableℂ x] [hy : IsComputableℂ y] :
      Decidable (x < y)
      Equations