Documentation

Init.Data.NeZero

NeZero typeclass #

We create a typeclass NeZero n which carries around the fact that (n : R) ≠ 0.

Main declarations #

class NeZero {R : Type u_1} [Zero R] (n : R) :

A type-class version of n ≠ 0.

  • out : n 0

    The proposition that n is not zero.

Instances
    theorem NeZero.ne {R : Type u_1} [Zero R] (n : R) [h : NeZero n] :
    n 0
    theorem NeZero.ne' {R : Type u_1} [Zero R] (n : R) [h : NeZero n] :
    0 n
    theorem neZero_iff {R : Type u_1} [Zero R] {n : R} :
    NeZero n n 0
    @[simp]
    theorem neZero_zero_iff_false {α : Type u_1} [Zero α] :
    theorem instNeZeroNatIte {p : Prop} [Decidable p] {n m : Nat} [NeZero n] [NeZero m] :
    NeZero (if p then n else m)