Documentation

Batteries.Classes.RatCast

class RatCast (K : Type u) :

Type class for the canonical homomorphism Rat → K.

  • ratCast : RatK

    The canonical homomorphism Rat → K.

Instances
    Equations
    @[reducible, match_pattern]
    def Rat.cast {K : Type u} [RatCast K] :
    RatK

    Canonical homomorphism from Rat to a division ring K. This is just the bare function in order to aid in creating instances of DivisionRing.

    Equations
    • Rat.cast = RatCast.ratCast
    Instances For
      instance instCoeTailRatOfRatCast {K : Type u_1} [RatCast K] :
      Equations
      • instCoeTailRatOfRatCast = { coe := Rat.cast }
      instance instCoeHTCTRatOfRatCast {K : Type u_1} [RatCast K] :
      Equations
      • instCoeHTCTRatOfRatCast = { coe := Rat.cast }