Sign type #
This file defines the type of signs $\{-1, 0, 1\}$ and its basic arithmetic instances.
The less-than-or-equal relation on signs.
- of_neg (a : SignType) : neg.LE a
- zero : SignType.zero.LE SignType.zero
- of_pos (a : SignType) : a.LE pos
Instances For
theorem
SignType.map_cast
{α : Type u_2}
{β : Type u_3}
{F : Type u_4}
[AddGroupWithOne α]
[One β]
[SubtractionMonoid β]
[FunLike F α β]
[AddMonoidHomClass F α β]
[OneHomClass F α β]
(f : F)
(s : SignType)
:
Casting out of SignType
respects composition with suitable bundled homomorphism types.
@[simp]
The sign of an element is 1 if it's positive, -1 if negative, 0 otherwise.
Equations
Instances For
@[simp]
theorem
StrictMono.sign_comp
{α : Type u_1}
[Zero α]
[LinearOrder α]
{β : Type u_2}
{F : Type u_3}
[Zero β]
[Preorder β]
[DecidableLT β]
[FunLike F α β]
[ZeroHomClass F α β]
{f : F}
(hf : StrictMono ⇑f)
(a : α)
:
SignType.sign
respects strictly monotone zero-preserving maps.
@[simp]
@[simp]
@[simp]
theorem
sign_one
{α : Type u_1}
[Semiring α]
[PartialOrder α]
[IsOrderedRing α]
[DecidableLT α]
[Nontrivial α]
:
theorem
Left.sign_neg
{α : Type u_1}
[AddGroup α]
[Preorder α]
[DecidableLT α]
[AddLeftStrictMono α]
(a : α)
:
theorem
Right.sign_neg
{α : Type u_1}
[AddGroup α]
[Preorder α]
[DecidableLT α]
[AddRightStrictMono α]
(a : α)
: