Documentation

Mathlib.Data.Int.Cast.Defs

Cast of integers #

This file defines the canonical homomorphism from the integers into an additive group with a one (typically a Ring). In additive groups with a one element, there exists a unique such homomorphism and we store it in the intCast : ℤ → R field.

Preferentially, the homomorphism is written as a coercion.

Main declarations #

def Int.castDef {R : Type u} [NatCast R] [Neg R] :
R

Default value for IntCast.intCast in an AddGroupWithOne.

Equations
Instances For

    Additive groups with one #

    class AddGroupWithOne (R : Type u) extends IntCast , AddMonoidWithOne , Neg , Sub :

    An AddGroupWithOne is an AddGroup with a 1. It also contains data for the unique homomorphisms ℕ → R and ℤ → R.

    Instances

      An AddCommGroupWithOne is an AddGroupWithOne satisfying a + b = b + a.

      Instances