statement stringlengths 1 2.93k | proof stringlengths 0 19.2k | type stringclasses 13
values | symbolic_name stringlengths 1 131 | library stringlengths 4 62 | filename stringlengths 20 95 | imports listlengths 0 10 | deps listlengths 0 64 | docstring stringlengths 0 4.95k | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
Prime.isPrimePow {p : R} (hp : Prime p) : IsPrimePow p | ⟨p, 1, hp, zero_lt_one, by simp⟩ | theorem | Prime.isPrimePow | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"Prime",
"zero_lt_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.pow {n : R} (hn : IsPrimePow n) {k : ℕ} (hk : k ≠ 0) : IsPrimePow (n ^ k) | let ⟨p, k', hp, hk', hn⟩ := hn
⟨p, k * k', hp, mul_pos hk.bot_lt hk', by rw [pow_mul', hn]⟩ | theorem | IsPrimePow.pow | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"pow_mul'"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.ne_zero [NoZeroDivisors R] {n : R} (h : IsPrimePow n) : n ≠ 0 | fun t =>
not_isPrimePow_zero (t ▸ h) | theorem | IsPrimePow.ne_zero | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"NoZeroDivisors",
"not_isPrimePow_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.ne_one {n : R} (h : IsPrimePow n) : n ≠ 1 | fun t =>
not_isPrimePow_one (t ▸ h) | theorem | IsPrimePow.ne_one | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"not_isPrimePow_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isPrimePow_nat_iff (n : ℕ) : IsPrimePow n ↔ ∃ p k : ℕ, Nat.Prime p ∧ 0 < k ∧ p ^ k = n | by
simp only [isPrimePow_def, Nat.prime_iff] | theorem | isPrimePow_nat_iff | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"Nat.Prime",
"Nat.prime_iff",
"isPrimePow_def"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
Nat.Prime.isPrimePow {p : ℕ} (hp : p.Prime) : IsPrimePow p | _root_.Prime.isPrimePow (prime_iff.mp hp) | theorem | Nat.Prime.isPrimePow | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isPrimePow_nat_iff_bounded (n : ℕ) :
IsPrimePow n ↔ ∃ p : ℕ, p ≤ n ∧ ∃ k : ℕ, k ≤ n ∧ p.Prime ∧ 0 < k ∧ p ^ k = n | by
rw [isPrimePow_nat_iff]
refine Iff.symm ⟨fun ⟨p, _, k, _, hp, hk, hn⟩ => ⟨p, k, hp, hk, hn⟩, ?_⟩
rintro ⟨p, k, hp, hk, rfl⟩
refine ⟨p, ?_, k, (Nat.lt_pow_self hp.one_lt).le, hp, hk, rfl⟩
conv => {lhs; rw [← (pow_one p)]}
exact Nat.pow_le_pow_right hp.one_lt.le hk | theorem | isPrimePow_nat_iff_bounded | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"isPrimePow_nat_iff",
"pow_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isPrimePow_nat_iff_bounded_log (n : ℕ) :
IsPrimePow n
↔ ∃ k : ℕ, k ≤ Nat.log 2 n ∧ 0 < k ∧ ∃ p : ℕ, p ≤ n ∧ n = p ^ k ∧ p.Prime | by
rw [isPrimePow_nat_iff]
constructor
· rintro ⟨p, k, hp', hk', rfl⟩
refine ⟨k, ?_, hk', ⟨p, Nat.le_pow hk', rfl, hp'⟩⟩
· calc
k = Nat.log 2 (2 ^ k) := by simp
_ ≤ Nat.log 2 (p ^ k) := Nat.log_mono Nat.one_lt_two Nat.AtLeastTwo.prop
(Nat.pow_le_pow_left ... | theorem | isPrimePow_nat_iff_bounded_log | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"Nat.Prime.two_le",
"Nat.log",
"Nat.log_mono",
"isPrimePow_nat_iff"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isPrimePow_nat_iff_bounded_log_minFac (n : ℕ) :
IsPrimePow n
↔ ∃ k : ℕ, k ≤ Nat.log 2 n ∧ 0 < k ∧ n = n.minFac ^ k | by
rw [isPrimePow_nat_iff_bounded_log]
obtain rfl | h := eq_or_ne n 1
· simp
constructor
· rintro ⟨k, hkle, hk_pos, p, hle, heq, hprime⟩
refine ⟨k, hkle, hk_pos, ?_⟩
rw [heq, hprime.pow_minFac hk_pos.ne']
· rintro ⟨k, hkle, hk_pos, heq⟩
refine ⟨k, hkle, hk_pos, n.minFac, Nat.minFac_le ?_, heq, ?... | theorem | isPrimePow_nat_iff_bounded_log_minFac | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"Nat.log",
"Nat.log_zero_right",
"Nat.minFac_le",
"Nat.minFac_prime_iff",
"eq_or_ne",
"isPrimePow_nat_iff_bounded_log",
"lt_self_iff_false"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.dvd {n m : ℕ} (hn : IsPrimePow n) (hm : m ∣ n) (hm₁ : m ≠ 1) : IsPrimePow m | by
grind [isPrimePow_nat_iff, Nat.dvd_prime_pow, Nat.pow_eq_one] | theorem | IsPrimePow.dvd | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"Nat.dvd_prime_pow",
"isPrimePow_nat_iff"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.two_le : ∀ {n : ℕ}, IsPrimePow n → 2 ≤ n | | 0, h => (not_isPrimePow_zero h).elim
| 1, h => (not_isPrimePow_one h).elim
| _n + 2, _ => le_add_self | theorem | IsPrimePow.two_le | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow",
"not_isPrimePow_one",
"not_isPrimePow_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.pos {n : ℕ} (hn : IsPrimePow n) : 0 < n | pos_of_gt hn.two_le | theorem | IsPrimePow.pos | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsPrimePow.one_lt {n : ℕ} (h : IsPrimePow n) : 1 < n | h.two_le | theorem | IsPrimePow.one_lt | Algebra | Mathlib/Algebra/IsPrimePow.lean | [] | [
"IsPrimePow"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
LinearRecurrence (R : Type*) [CommSemiring R] where
/-- Order of the linear recurrence -/
order : ℕ
/-- Coefficients of the linear recurrence -/
coeffs : Fin order → R | structure | LinearRecurrence | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"CommSemiring"
] | A "linear recurrence relation" over a commutative semiring is given by its
order `n` and `n` coefficients. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
IsSolution (u : ℕ → R) | ∀ n, u (n + E.order) = ∑ i, E.coeffs i * u (n + i) | def | LinearRecurrence.IsSolution | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | We say that a sequence `u` is solution of `LinearRecurrence order coeffs` when we have
`u (n + order) = ∑ i : Fin order, coeffs i * u (n + i)` for any `n`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
mkSol (init : Fin E.order → R) : ℕ → R | | n =>
if h : n < E.order then init ⟨n, h⟩
else
∑ k : Fin E.order,
have _ : n - E.order + k < n := by lia
E.coeffs k * mkSol init (n - E.order + k) | def | LinearRecurrence.mkSol | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | A solution of a `LinearRecurrence` which satisfies certain initial conditions.
We will prove this is the only such solution. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
is_sol_mkSol (init : Fin E.order → R) : E.IsSolution (E.mkSol init) | by
intro n
rw [mkSol]
simp | theorem | LinearRecurrence.is_sol_mkSol | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | `E.mkSol` indeed gives solutions to `E`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
mkSol_eq_init (init : Fin E.order → R) : ∀ n : Fin E.order, E.mkSol init n = init n | by
intro n
rw [mkSol]
simp only [n.is_lt, dif_pos, Fin.mk_val] | theorem | LinearRecurrence.mkSol_eq_init | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | `E.mkSol init`'s first `E.order` terms are `init`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
eq_mk_of_is_sol_of_eq_init {u : ℕ → R} {init : Fin E.order → R} (h : E.IsSolution u)
(heq : ∀ n : Fin E.order, u n = init n) : ∀ n, u n = E.mkSol init n | by
intro n
rw [mkSol]
split_ifs with h'
· exact mod_cast heq ⟨n, h'⟩
· dsimp only
rw [← tsub_add_cancel_of_le (le_of_not_gt h'), h (n - E.order)]
congr with k
rw [eq_mk_of_is_sol_of_eq_init h heq (n - E.order + k)]
simp | theorem | LinearRecurrence.eq_mk_of_is_sol_of_eq_init | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"le_of_not_gt",
"tsub_add_cancel_of_le"
] | If `u` is a solution to `E` and `init` designates its first `E.order` values,
then `∀ n, u n = E.mkSol init n`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
eq_mk_of_is_sol_of_eq_init' {u : ℕ → R} {init : Fin E.order → R} (h : E.IsSolution u)
(heq : ∀ n : Fin E.order, u n = init n) : u = E.mkSol init | funext (E.eq_mk_of_is_sol_of_eq_init h heq) | theorem | LinearRecurrence.eq_mk_of_is_sol_of_eq_init' | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | If `u` is a solution to `E` and `init` designates its first `E.order` values,
then `u = E.mkSol init`. This proves that `E.mkSol init` is the only solution
of `E` whose first `E.order` values are given by `init`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
solSpace : Submodule R (ℕ → R) | where
carrier := { u | E.IsSolution u }
zero_mem' n := by simp
add_mem' {u v} hu hv n := by simp [mul_add, sum_add_distrib, hu n, hv n]
smul_mem' a u hu n := by simp [hu n, mul_sum]; ac_rfl | def | LinearRecurrence.solSpace | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Submodule"
] | The space of solutions of `E`, as a `Submodule` over `R` of the module `ℕ → R`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
is_sol_iff_mem_solSpace (u : ℕ → R) : E.IsSolution u ↔ u ∈ E.solSpace | Iff.rfl | theorem | LinearRecurrence.is_sol_iff_mem_solSpace | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | Defining property of the solution space : `u` is a solution
iff it belongs to the solution space. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
toInit : E.solSpace ≃ₗ[R] Fin E.order → R | where
toFun u x := (u : ℕ → R) x
map_add' u v := by
ext
simp
map_smul' a u := by
ext
simp
invFun u := ⟨E.mkSol u, E.is_sol_mkSol u⟩
left_inv u := by ext n; symm; apply E.eq_mk_of_is_sol_of_eq_init u.2; intro k; rfl
right_inv u := funext_iff.mpr fun n ↦ E.mkSol_eq_init u n | def | LinearRecurrence.toInit | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"symm"
] | The function that maps a solution `u` of `E` to its first
`E.order` terms as a `LinearEquiv`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
mkSol_injective : E.mkSol.Injective | Subtype.val_injective.comp E.toInit.symm.injective | theorem | LinearRecurrence.mkSol_injective | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
basis : Module.Basis (Fin E.order) R E.solSpace | .ofEquivFun E.toInit | def | LinearRecurrence.basis | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Module.Basis"
] | A basis of the solution space given by solutions whose initial conditions are the standard basis
vectors | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
repr_basis_eq (u : E.solSpace) :
E.basis.repr u = .ofSupportFinite (u ∘ Fin.val) (Set.toFinite _) | rfl | theorem | LinearRecurrence.repr_basis_eq | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Set.toFinite"
] | The coordinates of a solution in the basis are its first `E.order` values | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
repr_basis_apply (u : E.solSpace) (n : Fin E.order) : E.basis.repr u n = u.val n | rfl | theorem | LinearRecurrence.repr_basis_apply | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | The nth coordinate of a solution in the basis equals its nth value | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
eq_iff_eqOn_range_order (u v : ℕ → R) (hu : E.IsSolution u) (hv : E.IsSolution v) :
u = v ↔ Set.EqOn u v ↑(range E.order) | by
replace hu : u ∈ E.solSpace := (is_sol_iff_mem_solSpace _ _).mp hu
replace hv : v ∈ E.solSpace := (is_sol_iff_mem_solSpace _ _).mp hv
rw [← Subtype.mk.injEq u hu v hv, ← E.basis.repr.injective.eq_iff]
constructor
· exact fun h n hn ↦ congr($h ⟨n, Finset.mem_range.mp hn⟩)
· exact fun h ↦ Finsupp.ext fun n... | theorem | LinearRecurrence.eq_iff_eqOn_range_order | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Finsupp.ext",
"Set.EqOn"
] | Two solutions are equal iff their initial conditions are equal. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
tupleSucc : (Fin E.order → R) →ₗ[R] Fin E.order → R | where
toFun X i := if h : (i : ℕ) + 1 < E.order then X ⟨i + 1, h⟩ else ∑ i, E.coeffs i * X i
map_add' x y := by
ext i
split_ifs with h <;> simp [h, mul_add, sum_add_distrib]
map_smul' x y := by
ext i
split_ifs with h <;>
simp only [Pi.smul_apply, smul_eq_mul, RingHom.id_apply, h, ↓reduceDIte... | def | LinearRecurrence.tupleSucc | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"RingHom.id_apply",
"smul_eq_mul"
] | `E.tupleSucc` maps `![s₀, s₁, ..., sₙ]` to `![s₁, ..., sₙ, ∑ (E.coeffs i) * sᵢ]`,
where `n := E.order`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
solSpace_rank : Module.rank R E.solSpace = E.order | by
simp [rank_eq_card_basis E.basis] | theorem | LinearRecurrence.solSpace_rank | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"rank_eq_card_basis"
] | The dimension of `E.solSpace` is `E.order`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
charPoly : R[X] | Polynomial.monomial E.order 1 - ∑ i : Fin E.order, Polynomial.monomial i (E.coeffs i) | def | LinearRecurrence.charPoly | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Polynomial.monomial"
] | The characteristic polynomial of `E` is
`X ^ E.order - ∑ i : Fin E.order, (E.coeffs i) * X ^ i`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
charPoly_degree_eq_order [Nontrivial R] : (charPoly E).degree = E.order | by
rw [charPoly, degree_sub_eq_left_of_degree_lt]
<;> rw [degree_monomial E.order one_ne_zero]
simp_rw [← C_mul_X_pow_eq_monomial]
exact degree_sum_fin_lt E.coeffs | theorem | LinearRecurrence.charPoly_degree_eq_order | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Nontrivial",
"one_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
charPoly_monic : charPoly E |>.Monic | by
nontriviality R
rw [Monic, leadingCoeff, natDegree_eq_of_degree_eq_some <| charPoly_degree_eq_order _, charPoly,
coeff_sub, coeff_monomial_same, finsetSum_coeff, sub_eq_self]
refine sum_eq_zero fun _ _ ↦ coeff_eq_zero_of_degree_lt ?_
grw [degree_monomial_le]
simp | theorem | LinearRecurrence.charPoly_monic | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
geom_sol_iff_root_charPoly (q : R) :
(E.IsSolution fun n ↦ q ^ n) ↔ E.charPoly.IsRoot q | by
rw [charPoly, Polynomial.IsRoot.def, Polynomial.eval]
simp only [Polynomial.eval₂_finsetSum, one_mul, RingHom.id_apply, Polynomial.eval₂_monomial,
Polynomial.eval₂_sub]
constructor
· intro h
simpa [sub_eq_zero] using h 0
· intro h n
simp only [pow_add, sub_eq_zero.mp h, mul_sum]
exact sum_c... | theorem | LinearRecurrence.geom_sol_iff_root_charPoly | Algebra | Mathlib/Algebra/LinearRecurrence.lean | [] | [
"Polynomial.IsRoot.def",
"Polynomial.eval",
"Polynomial.eval₂_finsetSum",
"Polynomial.eval₂_monomial",
"Polynomial.eval₂_sub",
"RingHom.id_apply",
"one_mul",
"pow_add"
] | The geometric sequence `q^n` is a solution of `E` iff
`q` is a root of `E`'s characteristic polynomial. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
not_neZero {n : R} : ¬NeZero n ↔ n = 0 | by simp [neZero_iff] | theorem | not_neZero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
eq_zero_or_neZero (a : R) : a = 0 ∨ NeZero a | (eq_or_ne a 0).imp_right NeZero.mk | theorem | eq_zero_or_neZero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"eq_or_ne"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
zero_ne_one [One α] [NeZero (1 : α)] : (0 : α) ≠ 1 | NeZero.ne' (1 : α) | lemma | zero_ne_one | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
one_ne_zero [One α] [NeZero (1 : α)] : (1 : α) ≠ 0 | NeZero.ne (1 : α) | lemma | one_ne_zero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
ne_zero_of_eq_one [One α] [NeZero (1 : α)] {a : α} (h : a = 1) : a ≠ 0 | h ▸ one_ne_zero | lemma | ne_zero_of_eq_one | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"one_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
two_ne_zero [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0 | NeZero.ne (2 : α) | lemma | two_ne_zero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
three_ne_zero [OfNat α 3] [NeZero (3 : α)] : (3 : α) ≠ 0 | NeZero.ne (3 : α) | lemma | three_ne_zero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
four_ne_zero [OfNat α 4] [NeZero (4 : α)] : (4 : α) ≠ 0 | NeZero.ne (4 : α) | lemma | four_ne_zero | Algebra | Mathlib/Algebra/NeZero.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
zero_ne_one' [One α] [NeZero (1 : α)] : (0 : α) ≠ 1 | zero_ne_one | lemma | zero_ne_one' | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"zero_ne_one"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
one_ne_zero' [One α] [NeZero (1 : α)] : (1 : α) ≠ 0 | one_ne_zero | lemma | one_ne_zero' | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"one_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
two_ne_zero' [OfNat α 2] [NeZero (2 : α)] : (2 : α) ≠ 0 | two_ne_zero | lemma | two_ne_zero' | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"two_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
three_ne_zero' [OfNat α 3] [NeZero (3 : α)] : (3 : α) ≠ 0 | three_ne_zero | lemma | three_ne_zero' | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"three_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
four_ne_zero' [OfNat α 4] [NeZero (4 : α)] : (4 : α) ≠ 0 | four_ne_zero | lemma | four_ne_zero' | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"four_ne_zero"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
of_pos [Preorder M] [Zero M] (h : 0 < x) : NeZero x | ⟨ne_of_gt h⟩ | theorem | NeZero.of_pos | Algebra | Mathlib/Algebra/NeZero.lean | [] | [
"Preorder"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
PosPart (α : Type*) where
/-- The *positive part* of an element `a`. -/
posPart : α → α | class | PosPart | Algebra | Mathlib/Algebra/Notation.lean | [] | [] | A notation class for the *positive part* function: `a⁺`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
OneLePart (α : Type*) where
/-- The *positive part* of an element `a`. -/
oneLePart : α → α | class | OneLePart | Algebra | Mathlib/Algebra/Notation.lean | [] | [] | A notation class for the *positive part* function (multiplicative version): `a⁺ᵐ`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
NegPart (α : Type*) where
/-- The *negative part* of an element `a`. -/
negPart : α → α | class | NegPart | Algebra | Mathlib/Algebra/Notation.lean | [] | [] | A notation class for the *negative part* function: `a⁻`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
LeOnePart (α : Type*) where
/-- The *negative part* of an element `a`. -/
leOnePart : α → α | class | LeOnePart | Algebra | Mathlib/Algebra/Notation.lean | [] | [] | A notation class for the *negative part* function (multiplicative version): `a⁻ᵐ`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
PreOpposite (α : Type*) : Type _ where
/-- The element of `PreOpposite α` that represents `x : α`. -/ op' ::
/-- The element of `α` represented by `x : PreOpposite α`. -/ unop' : α | structure | PreOpposite | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | Auxiliary type to implement `MulOpposite` and `AddOpposite`.
It turns out to be convenient to have `MulOpposite α = AddOpposite α` true by definition, in the
same way that it is convenient to have `Additive α = α`; this means that we also get the defeq
`AddOpposite (Additive α) = MulOpposite α`, which is convenient wh... | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
MulOpposite (α : Type*) : Type _ | PreOpposite α | def | MulOpposite | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"PreOpposite"
] | Multiplicative opposite of a type. This type inherits all additive structures on `α` and
reverses left and right in multiplication. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
op : α → αᵐᵒᵖ | PreOpposite.op' | def | MulOpposite.op | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | The element of `MulOpposite α` that represents `x : α`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
unop : αᵐᵒᵖ → α | PreOpposite.unop' | def | MulOpposite.unop | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | The element of `α` represented by `x : αᵐᵒᵖ`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
unop_op (x : α) : unop (op x) = x | rfl | theorem | MulOpposite.unop_op | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_unop (x : αᵐᵒᵖ) : op (unop x) = x | rfl | theorem | MulOpposite.op_unop | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_comp_unop : (op : α → αᵐᵒᵖ) ∘ unop = id | rfl | theorem | MulOpposite.op_comp_unop | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_comp_op : (unop : αᵐᵒᵖ → α) ∘ op = id | rfl | theorem | MulOpposite.unop_comp_op | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
rec' {F : αᵐᵒᵖ → Sort*} (h : ∀ X, F (op X)) : ∀ X, F X | fun X ↦ h (unop X) | def | MulOpposite.rec' | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | A recursor for `MulOpposite`. Use as `induction x`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
opEquiv : α ≃ αᵐᵒᵖ | ⟨op, unop, unop_op, op_unop⟩ | def | MulOpposite.opEquiv | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | The canonical bijection between `α` and `αᵐᵒᵖ`. | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
op_bijective : Bijective (op : α → αᵐᵒᵖ) | opEquiv.bijective | theorem | MulOpposite.op_bijective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_bijective : Bijective (unop : αᵐᵒᵖ → α) | opEquiv.symm.bijective | theorem | MulOpposite.unop_bijective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_injective : Injective (op : α → αᵐᵒᵖ) | op_bijective.injective | theorem | MulOpposite.op_injective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_surjective : Surjective (op : α → αᵐᵒᵖ) | op_bijective.surjective | theorem | MulOpposite.op_surjective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_injective : Injective (unop : αᵐᵒᵖ → α) | unop_bijective.injective | theorem | MulOpposite.unop_injective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_surjective : Surjective (unop : αᵐᵒᵖ → α) | unop_bijective.surjective | theorem | MulOpposite.unop_surjective | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_inj {x y : α} : op x = op y ↔ x = y | iff_of_eq <| PreOpposite.op'.injEq _ _ | theorem | MulOpposite.op_inj | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_inj {x y : αᵐᵒᵖ} : unop x = unop y ↔ x = y | unop_injective.eq_iff | theorem | MulOpposite.unop_inj | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
«forall» {p : αᵐᵒᵖ → Prop} : (∀ a, p a) ↔ ∀ a, p (op a) | op_surjective.forall | lemma | MulOpposite.«forall» | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
«exists» {p : αᵐᵒᵖ → Prop} : (∃ a, p a) ↔ ∃ a, p (op a) | op_surjective.exists | lemma | MulOpposite.«exists» | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instNontrivial [Nontrivial α] : Nontrivial αᵐᵒᵖ | op_injective.nontrivial | instance | MulOpposite.instNontrivial | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"Nontrivial"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instInhabited [Inhabited α] : Inhabited αᵐᵒᵖ | ⟨op default⟩ | instance | MulOpposite.instInhabited | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instSubsingleton [Subsingleton α] : Subsingleton αᵐᵒᵖ | unop_injective.subsingleton | instance | MulOpposite.instSubsingleton | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instUnique [Unique α] : Unique αᵐᵒᵖ | Unique.mk' _ | instance | MulOpposite.instUnique | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"Unique",
"Unique.mk'"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instIsEmpty [IsEmpty α] : IsEmpty αᵐᵒᵖ | Function.isEmpty unop | instance | MulOpposite.instIsEmpty | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"Function.isEmpty",
"IsEmpty"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instDecidableEq [DecidableEq α] : DecidableEq αᵐᵒᵖ | unop_injective.decidableEq | instance | MulOpposite.instDecidableEq | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instZero [Zero α] : Zero αᵐᵒᵖ | where zero := op 0 | instance | MulOpposite.instZero | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instOne [One α] : One αᵐᵒᵖ | where one := op 1 | instance | MulOpposite.instOne | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instAdd [Add α] : Add αᵐᵒᵖ | where add x y := op (unop x + unop y) | instance | MulOpposite.instAdd | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instSub [Sub α] : Sub αᵐᵒᵖ | where sub x y := op (unop x - unop y) | instance | MulOpposite.instSub | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instNeg [Neg α] : Neg αᵐᵒᵖ | where neg x := op <| -unop x | instance | MulOpposite.instNeg | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instInvolutiveNeg [InvolutiveNeg α] : InvolutiveNeg αᵐᵒᵖ | where
neg_neg _ := unop_injective <| neg_neg _ | instance | MulOpposite.instInvolutiveNeg | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"InvolutiveNeg"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instMul [Mul α] : Mul αᵐᵒᵖ | where mul x y := op (unop y * unop x) | instance | MulOpposite.instMul | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instInv [Inv α] : Inv αᵐᵒᵖ | where inv x := op <| (unop x)⁻¹ | instance | MulOpposite.instInv | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instInvolutiveInv [InvolutiveInv α] : InvolutiveInv αᵐᵒᵖ | where
inv_inv _ := unop_injective <| inv_inv _ | instance | MulOpposite.instInvolutiveInv | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"InvolutiveInv",
"inv_inv"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isLeftCancelAdd_iff [Add α] : IsLeftCancelAdd αᵐᵒᵖ ↔ IsLeftCancelAdd α | where
mp _ := ⟨fun _ _ _ eq ↦ op_injective <| add_left_cancel (congr_arg op eq)⟩
mpr _ := inferInstance | theorem | MulOpposite.isLeftCancelAdd_iff | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"IsLeftCancelAdd"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isRightCancelAdd_iff [Add α] : IsRightCancelAdd αᵐᵒᵖ ↔ IsRightCancelAdd α | where
mp _ := ⟨fun _ _ _ eq ↦ op_injective <| add_right_cancel (congr_arg op eq)⟩
mpr _ := inferInstance | theorem | MulOpposite.isRightCancelAdd_iff | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"IsRightCancelAdd"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
isCancelAdd_iff [Add α] : IsCancelAdd αᵐᵒᵖ ↔ IsCancelAdd α | by
simp_rw [isCancelAdd_iff, isLeftCancelAdd_iff, isRightCancelAdd_iff] | theorem | MulOpposite.isCancelAdd_iff | Algebra | Mathlib/Algebra/Opposites.lean | [] | [
"IsCancelAdd"
] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
instSMul [SMul α β] : SMul α βᵐᵒᵖ | where smul c x := op (c • unop x) | instance | MulOpposite.instSMul | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_zero [Zero α] : op (0 : α) = 0 | rfl | lemma | MulOpposite.op_zero | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_zero [Zero α] : unop (0 : αᵐᵒᵖ) = 0 | rfl | lemma | MulOpposite.unop_zero | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_one [One α] : op (1 : α) = 1 | rfl | lemma | MulOpposite.op_one | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_one [One α] : unop (1 : αᵐᵒᵖ) = 1 | rfl | lemma | MulOpposite.unop_one | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_add [Add α] (x y : α) : op (x + y) = op x + op y | rfl | lemma | MulOpposite.op_add | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_add [Add α] (x y : αᵐᵒᵖ) : unop (x + y) = unop x + unop y | rfl | lemma | MulOpposite.unop_add | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_neg [Neg α] (x : α) : op (-x) = -op x | rfl | lemma | MulOpposite.op_neg | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
unop_neg [Neg α] (x : αᵐᵒᵖ) : unop (-x) = -unop x | rfl | lemma | MulOpposite.unop_neg | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 | |
op_mul [Mul α] (x y : α) : op (x * y) = op y * op x | rfl | lemma | MulOpposite.op_mul | Algebra | Mathlib/Algebra/Opposites.lean | [] | [] | https://github.com/leanprover-community/mathlib4 | b9f14353520df73472ae3825fb53f86559a01319 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.