WithAbs #
WithAbs v is a type synonym for a semiring R which depends on an absolute value. The point of
this is to allow the type class inference system to handle multiple sources of instances that
arise from absolute values.
Main definitions #
- WithAbs: type synonym for a semiring which depends on an absolute value. This is a function that takes an absolute value on a semiring and returns the semiring. This can be used to assign and infer instances on a semiring that depend on absolute values.
- WithAbs.equiv v: the canonical (type) equivalence between- WithAbs vand- R.
- WithAbs.ringEquiv v: The canonical ring equivalence between- WithAbs vand- R.
Type synonym for a semiring which depends on an absolute value. This is a function that takes an absolute value on a semiring and returns the semiring. We use this to assign and infer instances on a semiring that depend on absolute values.
This is also helpful when dealing with several absolute values on the same semiring.
Instances For
Equations
Equations
Equations
- WithAbs.instInhabited v = { default := 0 }
The canonical (semiring) equivalence between WithAbs v and R.
Equations
- WithAbs.equiv v = RingEquiv.refl (WithAbs v)
Instances For
The canonical (semiring) equivalence between WithAbs v and WithAbs w, for any two
absolute values v and w on R.
Equations
- WithAbs.equivWithAbs v w = (WithAbs.equiv v).trans (WithAbs.equiv w).symm
Instances For
Equations
Equations
- WithAbs.instRing v = inferInstanceAs (Ring R)
Equations
Equations
Equations
- WithAbs.instModule_left v = inferInstanceAs (Module R R')
Equations
- WithAbs.instModule_right v = inferInstanceAs (Module R R')
Equations
- WithAbs.instAlgebra_left v = inferInstanceAs (Algebra R R')
Equations
- WithAbs.instAlgebra_right v = inferInstanceAs (Algebra R R')
The canonical algebra isomorphism from an R-algebra R' with an absolute value v
to R'.
Equations
Instances For
An absolute value w of L / K lies over the absolute value v of K if v is the
restriction of w to K.