Documentation
LeanAPAP
.
Mathlib
.
Data
.
ZMod
.
Basic
Search
Google site search
return to top
source
Imports
Init
Mathlib.Data.ZMod.Basic
Imported by
ZMod
.
cast_int_add
ZMod
.
cast_int_mul
ZMod
.
cast_int_sub
ZMod
.
cast_int_neg
ZMod
.
val_one''
ZMod
.
inv_one
ZMod
.
mul_val_inv
ZMod
.
val_inv_mul
ZMod
.
lift_injective
pow_zmod_val_inv_pow
pow_pow_zmod_val_inv
nsmul_zmod_val_inv_nsmul
zmod_val_inv_nsmul_nsmul
source
theorem
ZMod
.
cast_int_add
{n :
ℕ
}
{x :
ZMod
n
}
{y :
ZMod
n
}
:
ZMod.cast
(
x
+
y
)
=
(
ZMod.cast
x
+
ZMod.cast
y
)
%
↑
n
source
theorem
ZMod
.
cast_int_mul
{n :
ℕ
}
{x :
ZMod
n
}
{y :
ZMod
n
}
:
ZMod.cast
(
x
*
y
)
=
ZMod.cast
x
*
ZMod.cast
y
%
↑
n
source
theorem
ZMod
.
cast_int_sub
{n :
ℕ
}
{x :
ZMod
n
}
{y :
ZMod
n
}
:
ZMod.cast
(
x
-
y
)
=
(
ZMod.cast
x
-
ZMod.cast
y
)
%
↑
n
source
theorem
ZMod
.
cast_int_neg
{n :
ℕ
}
{x :
ZMod
n
}
:
ZMod.cast
(
-
x
)
=
-
ZMod.cast
x
%
↑
n
source
theorem
ZMod
.
val_one''
{n :
ℕ
}
:
n
≠
1
→
ZMod.val
1
=
1
source
@[simp]
theorem
ZMod
.
inv_one
(n :
ℕ
)
:
1
⁻¹
=
1
source
theorem
ZMod
.
mul_val_inv
{m :
ℕ
}
{n :
ℕ
}
(hmn :
Nat.Coprime
m
n
)
:
↑
m
*
↑
(
ZMod.val
(
↑
m
)
⁻¹
)
=
1
source
theorem
ZMod
.
val_inv_mul
{m :
ℕ
}
{n :
ℕ
}
(hmn :
Nat.Coprime
m
n
)
:
↑
(
ZMod.val
(
↑
m
)
⁻¹
)
*
↑
m
=
1
source
theorem
ZMod
.
lift_injective
{n :
ℕ
}
{A :
Type
u_1}
[
AddCommGroup
A
]
{f :
{
f
:
ℤ
→+
A
//
f
↑
n
=
0
}
}
:
Function.Injective
⇑
(
(
ZMod.lift
n
)
f
)
↔
∀ (
i
:
ℤ
),
↑
f
i
=
0
→
↑
i
=
0
source
@[simp]
theorem
pow_zmod_val_inv_pow
{α :
Type
u_1}
[
Group
α
]
{n :
ℕ
}
(hn :
Nat.Coprime
(
Nat.card
α
)
n
)
(a :
α
)
:
(
a
^
ZMod.val
(
↑
n
)
⁻¹
)
^
n
=
a
source
@[simp]
theorem
pow_pow_zmod_val_inv
{α :
Type
u_1}
[
Group
α
]
{n :
ℕ
}
(hn :
Nat.Coprime
(
Nat.card
α
)
n
)
(a :
α
)
:
(
a
^
n
)
^
ZMod.val
(
↑
n
)
⁻¹
=
a
source
@[simp]
theorem
nsmul_zmod_val_inv_nsmul
{α :
Type
u_1}
[
AddGroup
α
]
{n :
ℕ
}
(hn :
Nat.Coprime
(
Nat.card
α
)
n
)
(a :
α
)
:
n
•
ZMod.val
(
↑
n
)
⁻¹
•
a
=
a
source
@[simp]
theorem
zmod_val_inv_nsmul_nsmul
{α :
Type
u_1}
[
AddGroup
α
]
{n :
ℕ
}
(hn :
Nat.Coprime
(
Nat.card
α
)
n
)
(a :
α
)
:
ZMod.val
(
↑
n
)
⁻¹
•
n
•
a
=
a