Documentation

Mathlib.Init.ZeroOne

Note about Mathlib/Init/ #

The files in Mathlib/Init are leftovers from the port from Mathlib3. (They contain content moved from lean3 itself that Mathlib needed but was not moved to lean4.)

We intend to move all the content of these files out into the main Mathlib directory structure. Contributions assisting with this are appreciated.

#align statements without corresponding declarations (i.e. because the declaration is in Batteries or Lean) can be left here. These will be deleted soon so will not significantly delay deleting otherwise empty Init files.

Classes for Zero and One #

class Zero (α : Type u) :
  • zero : α
Instances
    @[instance 300]
    instance Zero.toOfNat0 {α : Type u_1} [Zero α] :
    OfNat α 0
    Equations
    • Zero.toOfNat0 = { ofNat := Zero.zero }
    @[instance 200]
    instance Zero.ofOfNat0 {α : Type u_1} [OfNat α 0] :
    Zero α
    Equations
    • Zero.ofOfNat0 = { zero := 0 }
    class One (α : Type u) :
    • one : α
    Instances
      @[instance 300]
      instance One.toOfNat1 {α : Type u_1} [One α] :
      OfNat α 1
      Equations
      • One.toOfNat1 = { ofNat := One.one }
      @[instance 200]
      instance One.ofOfNat1 {α : Type u_1} [OfNat α 1] :
      One α
      Equations
      • One.ofOfNat1 = { one := 1 }