lecopivo / SciLean

Scientific computing in Lean 4

Home Page:https://lecopivo.github.io/SciLean/build/doc/SciLean.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can scalar have a repr instance when ground fields do?

alok opened this issue · comments

missing repr is annoying

I don't understand, can you give mwe?

class Scalar (R : outParam (Type _)) (K : semiOutParam (Type _)) extends RCLike K where
  -- used for specification
  toComplex : K → ℂ
  toReal    : R → ℝ
  ofReal    : ℝ → R
  ofComplex : ℂ → K -- If `K` model reals then this function should ignore the imaginary part

where if K (R too?) has Repr instance, so should Scalar

You need to be even more clearer. Scalar is a class, I don't understand why should it have Repr instance. Do you mean that Scalar should extend Repr R? That is probably bad idea as I don't think you can provide instance Repr Real