Documentation
Mathlib
.
Algebra
.
Group
.
ZeroOne
Search
Google site search
return to top
source
Imports
Init
Mathlib.Tactic.ToAdditive
Imported by
One
One
.
toOfNat1
One
.
ofOfNat1
Zero
.
instNonempty
One
.
instNonempty
Subsingleton
.
eq_one
Subsingleton
.
eq_zero
Typeclass
One
#
Zero
has already been defined in Lean.
source
class
One
(α :
Type
u)
:
Type
u
one :
α
Instances
source
@[instance 300]
instance
One
.
toOfNat1
{α :
Type
u_1}
[
One
α
]
:
OfNat
α
1
Equations
One.toOfNat1
=
{
ofNat
:=
One.one
}
source
@[instance 200]
instance
One
.
ofOfNat1
{α :
Type
u_1}
[
OfNat
α
1
]
:
One
α
Equations
One.ofOfNat1
=
{
one
:=
1
}
source
@[instance 20]
instance
Zero
.
instNonempty
{α :
Type
u}
[
Zero
α
]
:
Nonempty
α
source
@[instance 20]
instance
One
.
instNonempty
{α :
Type
u}
[
One
α
]
:
Nonempty
α
source
theorem
Subsingleton
.
eq_one
{α :
Type
u}
[
One
α
]
[
Subsingleton
α
]
(a :
α
)
:
a
=
1
source
theorem
Subsingleton
.
eq_zero
{α :
Type
u}
[
Zero
α
]
[
Subsingleton
α
]
(a :
α
)
:
a
=
0