Dataset Viewer
Auto-converted to Parquet Duplicate
fact
stringlengths
6
14.3k
statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
12 values
symbolic_name
stringlengths
0
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
8
10.2k
line_start
int64
6
4.24k
line_end
int64
7
4.25k
has_proof
bool
2 classes
source_url
stringclasses
1 value
commit
stringclasses
1 value
has_abs (α : Type*) := (abs : α → α)
has_abs (α : Type*)
(abs : α → α)
class
has_abs
algebra
src/algebra/abs.lean
[]
[]
Absolute value is a unary operator with properties similar to the absolute value of a real number.
39
39
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_pos_part (α : Type*) := (pos : α → α)
has_pos_part (α : Type*)
(pos : α → α)
class
has_pos_part
algebra
src/algebra/abs.lean
[]
[]
The positive part of an element admiting a decomposition into positive and negative parts.
45
45
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
has_neg_part (α : Type*) := (neg : α → α)
has_neg_part (α : Type*)
(neg : α → α)
class
has_neg_part
algebra
src/algebra/abs.lean
[]
[]
The negative part of an element admiting a decomposition into positive and negative parts.
50
50
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_torsor (G : out_param Type*) (P : Type*) [out_param $ add_group G] extends add_action G P, has_vsub G P := [nonempty : nonempty P] (vsub_vadd' : ∀ (p1 p2 : P), (p1 -ᵥ p2 : G) +ᵥ p2 = p1) (vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g)
add_torsor (G : out_param Type*) (P : Type*) [out_param $ add_group G] extends add_action G P, has_vsub G P
[nonempty : nonempty P] (vsub_vadd' : ∀ (p1 p2 : P), (p1 -ᵥ p2 : G) +ᵥ p2 = p1) (vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g)
class
add_torsor
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_action", "add_group", "has_vsub" ]
An `add_torsor G P` gives a structure to the nonempty type `P`, acted on by an `add_group G` with a transitive and free action given by the `+ᵥ` operation and a corresponding subtraction given by the `-ᵥ` operation. In the case of a vector space, it is an affine space.
48
52
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_group_is_add_torsor (G : Type*) [add_group G] : add_torsor G G := { vsub := has_sub.sub, vsub_vadd' := sub_add_cancel, vadd_vsub' := add_sub_cancel }
add_group_is_add_torsor (G : Type*) [add_group G] : add_torsor G G
{ vsub := has_sub.sub, vsub_vadd' := sub_add_cancel, vadd_vsub' := add_sub_cancel }
instance
add_group_is_add_torsor
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_group", "add_torsor" ]
An `add_group G` is a torsor for itself.
58
63
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_eq_sub {G : Type*} [add_group G] (g1 g2 : G) : g1 -ᵥ g2 = g1 - g2 := rfl
vsub_eq_sub {G : Type*} [add_group G] (g1 g2 : G) : g1 -ᵥ g2 = g1 - g2
rfl
lemma
vsub_eq_sub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_group" ]
Simplify subtraction for a torsor for an `add_group G` over itself.
67
68
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_vadd (p1 p2 : P) : p1 -ᵥ p2 +ᵥ p2 = p1 := add_torsor.vsub_vadd' p1 p2
vsub_vadd (p1 p2 : P) : p1 -ᵥ p2 +ᵥ p2 = p1
add_torsor.vsub_vadd' p1 p2
lemma
vsub_vadd
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
Adding the result of subtracting from another point produces that point.
77
78
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_vsub (g : G) (p : P) : g +ᵥ p -ᵥ p = g := add_torsor.vadd_vsub' g p
vadd_vsub (g : G) (p : P) : g +ᵥ p -ᵥ p = g
add_torsor.vadd_vsub' g p
lemma
vadd_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
Adding a group element then subtracting the original point produces that group element.
82
83
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_right_cancel {g1 g2 : G} (p : P) (h : g1 +ᵥ p = g2 +ᵥ p) : g1 = g2 := by rw [←vadd_vsub g1, h, vadd_vsub]
vadd_right_cancel {g1 g2 : G} (p : P) (h : g1 +ᵥ p = g2 +ᵥ p) : g1 = g2
by rw [←vadd_vsub g1, h, vadd_vsub]
lemma
vadd_right_cancel
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub" ]
If the same point added to two group elements produces equal results, those group elements are equal.
87
88
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_right_cancel_iff {g1 g2 : G} (p : P) : g1 +ᵥ p = g2 +ᵥ p ↔ g1 = g2 := ⟨vadd_right_cancel p, λ h, h ▸ rfl⟩
vadd_right_cancel_iff {g1 g2 : G} (p : P) : g1 +ᵥ p = g2 +ᵥ p ↔ g1 = g2
⟨vadd_right_cancel p, λ h, h ▸ rfl⟩
lemma
vadd_right_cancel_iff
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
90
91
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_right_injective (p : P) : function.injective ((+ᵥ p) : G → P) := λ g1 g2, vadd_right_cancel p
vadd_right_injective (p : P) : function.injective ((+ᵥ p) : G → P)
λ g1 g2, vadd_right_cancel p
lemma
vadd_right_injective
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_right_cancel" ]
Adding a group element to the point `p` is an injective function.
95
96
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_vsub_assoc (g : G) (p1 p2 : P) : g +ᵥ p1 -ᵥ p2 = g + (p1 -ᵥ p2) := begin apply vadd_right_cancel p2, rw [vsub_vadd, add_vadd, vsub_vadd] end
vadd_vsub_assoc (g : G) (p1 p2 : P) : g +ᵥ p1 -ᵥ p2 = g + (p1 -ᵥ p2)
begin apply vadd_right_cancel p2, rw [vsub_vadd, add_vadd, vsub_vadd] end
lemma
vadd_vsub_assoc
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_right_cancel", "vsub_vadd" ]
Adding a group element to a point, then subtracting another point, produces the same result as subtracting the points then adding the group element.
101
105
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_self (p : P) : p -ᵥ p = (0 : G) := by rw [←zero_add (p -ᵥ p), ←vadd_vsub_assoc, vadd_vsub]
vsub_self (p : P) : p -ᵥ p = (0 : G)
by rw [←zero_add (p -ᵥ p), ←vadd_vsub_assoc, vadd_vsub]
lemma
vsub_self
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub" ]
Subtracting a point from itself produces 0.
108
109
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_of_vsub_eq_zero {p1 p2 : P} (h : p1 -ᵥ p2 = (0 : G)) : p1 = p2 := by rw [←vsub_vadd p1 p2, h, zero_vadd]
eq_of_vsub_eq_zero {p1 p2 : P} (h : p1 -ᵥ p2 = (0 : G)) : p1 = p2
by rw [←vsub_vadd p1 p2, h, zero_vadd]
lemma
eq_of_vsub_eq_zero
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
If subtracting two points produces 0, they are equal.
112
113
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_eq_zero_iff_eq {p1 p2 : P} : p1 -ᵥ p2 = (0 : G) ↔ p1 = p2 := iff.intro eq_of_vsub_eq_zero (λ h, h ▸ vsub_self _)
vsub_eq_zero_iff_eq {p1 p2 : P} : p1 -ᵥ p2 = (0 : G) ↔ p1 = p2
iff.intro eq_of_vsub_eq_zero (λ h, h ▸ vsub_self _)
lemma
vsub_eq_zero_iff_eq
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "eq_of_vsub_eq_zero", "vsub_self" ]
Subtracting two points produces 0 if and only if they are equal.
117
118
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_ne_zero {p q : P} : p -ᵥ q ≠ (0 : G) ↔ p ≠ q := not_congr vsub_eq_zero_iff_eq
vsub_ne_zero {p q : P} : p -ᵥ q ≠ (0 : G) ↔ p ≠ q
not_congr vsub_eq_zero_iff_eq
lemma
vsub_ne_zero
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_eq_zero_iff_eq" ]
null
120
121
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_add_vsub_cancel (p1 p2 p3 : P) : p1 -ᵥ p2 + (p2 -ᵥ p3) = (p1 -ᵥ p3) := begin apply vadd_right_cancel p3, rw [add_vadd, vsub_vadd, vsub_vadd, vsub_vadd] end
vsub_add_vsub_cancel (p1 p2 p3 : P) : p1 -ᵥ p2 + (p2 -ᵥ p3) = (p1 -ᵥ p3)
begin apply vadd_right_cancel p3, rw [add_vadd, vsub_vadd, vsub_vadd, vsub_vadd] end
lemma
vsub_add_vsub_cancel
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_right_cancel", "vsub_vadd" ]
Cancellation adding the results of two subtractions.
124
128
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
neg_vsub_eq_vsub_rev (p1 p2 : P) : -(p1 -ᵥ p2) = (p2 -ᵥ p1) := begin refine neg_eq_of_add_eq_zero_right (vadd_right_cancel p1 _), rw [vsub_add_vsub_cancel, vsub_self], end
neg_vsub_eq_vsub_rev (p1 p2 : P) : -(p1 -ᵥ p2) = (p2 -ᵥ p1)
begin refine neg_eq_of_add_eq_zero_right (vadd_right_cancel p1 _), rw [vsub_add_vsub_cancel, vsub_self], end
lemma
neg_vsub_eq_vsub_rev
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_right_cancel", "vsub_add_vsub_cancel", "vsub_self" ]
Subtracting two points in the reverse order produces the negation of subtracting them.
132
136
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_vsub_eq_sub_vsub (g : G) (p q : P) : g +ᵥ p -ᵥ q = g - (q -ᵥ p) := by rw [vadd_vsub_assoc, sub_eq_add_neg, neg_vsub_eq_vsub_rev]
vadd_vsub_eq_sub_vsub (g : G) (p q : P) : g +ᵥ p -ᵥ q = g - (q -ᵥ p)
by rw [vadd_vsub_assoc, sub_eq_add_neg, neg_vsub_eq_vsub_rev]
lemma
vadd_vsub_eq_sub_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "neg_vsub_eq_vsub_rev", "vadd_vsub_assoc" ]
null
138
139
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_vadd_eq_vsub_sub (p1 p2 : P) (g : G) : p1 -ᵥ (g +ᵥ p2) = (p1 -ᵥ p2) - g := by rw [←add_right_inj (p2 -ᵥ p1 : G), vsub_add_vsub_cancel, ←neg_vsub_eq_vsub_rev, vadd_vsub, ←add_sub_assoc, ←neg_vsub_eq_vsub_rev, neg_add_self, zero_sub]
vsub_vadd_eq_vsub_sub (p1 p2 : P) (g : G) : p1 -ᵥ (g +ᵥ p2) = (p1 -ᵥ p2) - g
by rw [←add_right_inj (p2 -ᵥ p1 : G), vsub_add_vsub_cancel, ←neg_vsub_eq_vsub_rev, vadd_vsub, ←add_sub_assoc, ←neg_vsub_eq_vsub_rev, neg_add_self, zero_sub]
lemma
vsub_vadd_eq_vsub_sub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub", "vsub_add_vsub_cancel" ]
Subtracting the result of adding a group element produces the same result as subtracting the points and subtracting that group element.
143
145
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_sub_vsub_cancel_right (p1 p2 p3 : P) : (p1 -ᵥ p3) - (p2 -ᵥ p3) = (p1 -ᵥ p2) := by rw [←vsub_vadd_eq_vsub_sub, vsub_vadd]
vsub_sub_vsub_cancel_right (p1 p2 p3 : P) : (p1 -ᵥ p3) - (p2 -ᵥ p3) = (p1 -ᵥ p2)
by rw [←vsub_vadd_eq_vsub_sub, vsub_vadd]
lemma
vsub_sub_vsub_cancel_right
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_vadd" ]
Cancellation subtracting the results of two subtractions.
148
150
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_vadd_iff_vsub_eq (p1 : P) (g : G) (p2 : P) : p1 = g +ᵥ p2 ↔ p1 -ᵥ p2 = g := ⟨λ h, h.symm ▸ vadd_vsub _ _, λ h, h ▸ (vsub_vadd _ _).symm⟩
eq_vadd_iff_vsub_eq (p1 : P) (g : G) (p2 : P) : p1 = g +ᵥ p2 ↔ p1 -ᵥ p2 = g
⟨λ h, h.symm ▸ vadd_vsub _ _, λ h, h ▸ (vsub_vadd _ _).symm⟩
lemma
eq_vadd_iff_vsub_eq
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub", "vsub_vadd" ]
Convert between an equality with adding a group element to a point and an equality of a subtraction of two points with a group element.
155
156
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_eq_vadd_iff_neg_add_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} : v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ - v₁ + v₂ = p₁ -ᵥ p₂ := by rw [eq_vadd_iff_vsub_eq, vadd_vsub_assoc, ← add_right_inj (-v₁), neg_add_cancel_left, eq_comm]
vadd_eq_vadd_iff_neg_add_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} : v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ - v₁ + v₂ = p₁ -ᵥ p₂
by rw [eq_vadd_iff_vsub_eq, vadd_vsub_assoc, ← add_right_inj (-v₁), neg_add_cancel_left, eq_comm]
lemma
vadd_eq_vadd_iff_neg_add_eq_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "eq_vadd_iff_vsub_eq", "vadd_vsub_assoc" ]
null
158
160
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
singleton_vsub_self (p : P) : ({p} : set P) -ᵥ {p} = {(0:G)} := by rw [set.singleton_vsub_singleton, vsub_self]
singleton_vsub_self (p : P) : ({p} : set P) -ᵥ {p} = {(0:G)}
by rw [set.singleton_vsub_singleton, vsub_self]
lemma
set.singleton_vsub_self
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "set.singleton_vsub_singleton", "vsub_self" ]
null
165
166
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_vsub_vadd_cancel_right (v₁ v₂ : G) (p : P) : (v₁ +ᵥ p) -ᵥ (v₂ +ᵥ p) = v₁ - v₂ := by rw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, vsub_self, add_zero]
vadd_vsub_vadd_cancel_right (v₁ v₂ : G) (p : P) : (v₁ +ᵥ p) -ᵥ (v₂ +ᵥ p) = v₁ - v₂
by rw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, vsub_self, add_zero]
lemma
vadd_vsub_vadd_cancel_right
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub_assoc", "vsub_self", "vsub_vadd_eq_vsub_sub" ]
null
170
172
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_left_cancel {p1 p2 p : P} (h : p1 -ᵥ p = p2 -ᵥ p) : p1 = p2 := by rwa [←sub_eq_zero, vsub_sub_vsub_cancel_right, vsub_eq_zero_iff_eq] at h
vsub_left_cancel {p1 p2 p : P} (h : p1 -ᵥ p = p2 -ᵥ p) : p1 = p2
by rwa [←sub_eq_zero, vsub_sub_vsub_cancel_right, vsub_eq_zero_iff_eq] at h
lemma
vsub_left_cancel
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_eq_zero_iff_eq", "vsub_sub_vsub_cancel_right" ]
If the same point subtracted from two points produces equal results, those points are equal.
176
177
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_left_cancel_iff {p1 p2 p : P} : (p1 -ᵥ p) = p2 -ᵥ p ↔ p1 = p2 := ⟨vsub_left_cancel, λ h, h ▸ rfl⟩
vsub_left_cancel_iff {p1 p2 p : P} : (p1 -ᵥ p) = p2 -ᵥ p ↔ p1 = p2
⟨vsub_left_cancel, λ h, h ▸ rfl⟩
lemma
vsub_left_cancel_iff
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
The same point subtracted from two points produces equal results if and only if those points are equal.
181
182
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_left_injective (p : P) : function.injective ((-ᵥ p) : P → G) := λ p2 p3, vsub_left_cancel
vsub_left_injective (p : P) : function.injective ((-ᵥ p) : P → G)
λ p2 p3, vsub_left_cancel
lemma
vsub_left_injective
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_left_cancel" ]
Subtracting the point `p` is an injective function.
185
186
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_right_cancel {p1 p2 p : P} (h : p -ᵥ p1 = p -ᵥ p2) : p1 = p2 := begin refine vadd_left_cancel (p -ᵥ p2) _, rw [vsub_vadd, ← h, vsub_vadd] end
vsub_right_cancel {p1 p2 p : P} (h : p -ᵥ p1 = p -ᵥ p2) : p1 = p2
begin refine vadd_left_cancel (p -ᵥ p2) _, rw [vsub_vadd, ← h, vsub_vadd] end
lemma
vsub_right_cancel
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_vadd" ]
If subtracting two points from the same point produces equal results, those points are equal.
190
194
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_right_cancel_iff {p1 p2 p : P} : p -ᵥ p1 = p -ᵥ p2 ↔ p1 = p2 := ⟨vsub_right_cancel, λ h, h ▸ rfl⟩
vsub_right_cancel_iff {p1 p2 p : P} : p -ᵥ p1 = p -ᵥ p2 ↔ p1 = p2
⟨vsub_right_cancel, λ h, h ▸ rfl⟩
lemma
vsub_right_cancel_iff
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
Subtracting two points from the same point produces equal results if and only if those points are equal.
198
199
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_right_injective (p : P) : function.injective ((-ᵥ) p : P → G) := λ p2 p3, vsub_right_cancel
vsub_right_injective (p : P) : function.injective ((-ᵥ) p : P → G)
λ p2 p3, vsub_right_cancel
lemma
vsub_right_injective
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_right_cancel" ]
Subtracting a point from the point `p` is an injective function.
203
204
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_sub_vsub_cancel_left (p1 p2 p3 : P) : (p3 -ᵥ p2) - (p3 -ᵥ p1) = (p1 -ᵥ p2) := by rw [sub_eq_add_neg, neg_vsub_eq_vsub_rev, add_comm, vsub_add_vsub_cancel]
vsub_sub_vsub_cancel_left (p1 p2 p3 : P) : (p3 -ᵥ p2) - (p3 -ᵥ p1) = (p1 -ᵥ p2)
by rw [sub_eq_add_neg, neg_vsub_eq_vsub_rev, add_comm, vsub_add_vsub_cancel]
lemma
vsub_sub_vsub_cancel_left
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "neg_vsub_eq_vsub_rev", "vsub_add_vsub_cancel" ]
Cancellation subtracting the results of two subtractions.
215
217
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_vsub_vadd_cancel_left (v : G) (p1 p2 : P) : (v +ᵥ p1) -ᵥ (v +ᵥ p2) = p1 -ᵥ p2 := by rw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, add_sub_cancel']
vadd_vsub_vadd_cancel_left (v : G) (p1 p2 : P) : (v +ᵥ p1) -ᵥ (v +ᵥ p2) = p1 -ᵥ p2
by rw [vsub_vadd_eq_vsub_sub, vadd_vsub_assoc, add_sub_cancel']
lemma
vadd_vsub_vadd_cancel_left
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub_assoc", "vsub_vadd_eq_vsub_sub" ]
null
219
221
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_vadd_comm (p1 p2 p3 : P) : (p1 -ᵥ p2 : G) +ᵥ p3 = p3 -ᵥ p2 +ᵥ p1 := begin rw [←@vsub_eq_zero_iff_eq G, vadd_vsub_assoc, vsub_vadd_eq_vsub_sub], simp end
vsub_vadd_comm (p1 p2 p3 : P) : (p1 -ᵥ p2 : G) +ᵥ p3 = p3 -ᵥ p2 +ᵥ p1
begin rw [←@vsub_eq_zero_iff_eq G, vadd_vsub_assoc, vsub_vadd_eq_vsub_sub], simp end
lemma
vsub_vadd_comm
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_vsub_assoc", "vsub_eq_zero_iff_eq", "vsub_vadd_eq_vsub_sub" ]
null
223
227
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_eq_vadd_iff_sub_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} : v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ v₂ - v₁ = p₁ -ᵥ p₂ := by rw [vadd_eq_vadd_iff_neg_add_eq_vsub, neg_add_eq_sub]
vadd_eq_vadd_iff_sub_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} : v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ v₂ - v₁ = p₁ -ᵥ p₂
by rw [vadd_eq_vadd_iff_neg_add_eq_vsub, neg_add_eq_sub]
lemma
vadd_eq_vadd_iff_sub_eq_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vadd_eq_vadd_iff_neg_add_eq_vsub" ]
null
229
231
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vsub_sub_vsub_comm (p₁ p₂ p₃ p₄ : P) : (p₁ -ᵥ p₂) - (p₃ -ᵥ p₄) = (p₁ -ᵥ p₃) - (p₂ -ᵥ p₄) := by rw [← vsub_vadd_eq_vsub_sub, vsub_vadd_comm, vsub_vadd_eq_vsub_sub]
vsub_sub_vsub_comm (p₁ p₂ p₃ p₄ : P) : (p₁ -ᵥ p₂) - (p₃ -ᵥ p₄) = (p₁ -ᵥ p₃) - (p₂ -ᵥ p₄)
by rw [← vsub_vadd_eq_vsub_sub, vsub_vadd_comm, vsub_vadd_eq_vsub_sub]
lemma
vsub_sub_vsub_comm
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_vadd_comm", "vsub_vadd_eq_vsub_sub" ]
null
233
235
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
: add_torsor (G × G') (P × P') := { vadd := λ v p, (v.1 +ᵥ p.1, v.2 +ᵥ p.2), zero_vadd := λ p, by simp, add_vadd := by simp [add_vadd], vsub := λ p₁ p₂, (p₁.1 -ᵥ p₂.1, p₁.2 -ᵥ p₂.2), nonempty := prod.nonempty, vsub_vadd' := λ p₁ p₂, show (p₁.1 -ᵥ p₂.1 +ᵥ p₂.1, _) = p₁, by simp, vadd_vsub' := λ v p, show (v....
: add_torsor (G × G') (P × P')
{ vadd := λ v p, (v.1 +ᵥ p.1, v.2 +ᵥ p.2), zero_vadd := λ p, by simp, add_vadd := by simp [add_vadd], vsub := λ p₁ p₂, (p₁.1 -ᵥ p₂.1, p₁.2 -ᵥ p₂.2), nonempty := prod.nonempty, vsub_vadd' := λ p₁ p₂, show (p₁.1 -ᵥ p₂.1 +ᵥ p₂.1, _) = p₁, by simp, vadd_vsub' := λ v p, show (v.1 +ᵥ p.1 -ᵥ p.1, v.2 +ᵥ p.2 -ᵥ p.2...
instance
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_torsor" ]
null
244
251
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fst_vadd (v : G × G') (p : P × P') : (v +ᵥ p).1 = v.1 +ᵥ p.1 := rfl
fst_vadd (v : G × G') (p : P × P') : (v +ᵥ p).1 = v.1 +ᵥ p.1
rfl
lemma
prod.fst_vadd
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
253
253
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
snd_vadd (v : G × G') (p : P × P') : (v +ᵥ p).2 = v.2 +ᵥ p.2 := rfl
snd_vadd (v : G × G') (p : P × P') : (v +ᵥ p).2 = v.2 +ᵥ p.2
rfl
lemma
prod.snd_vadd
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
254
254
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_vadd_mk (v : G) (v' : G') (p : P) (p' : P') : (v, v') +ᵥ (p, p') = (v +ᵥ p, v' +ᵥ p') := rfl
mk_vadd_mk (v : G) (v' : G') (p : P) (p' : P') : (v, v') +ᵥ (p, p') = (v +ᵥ p, v' +ᵥ p')
rfl
lemma
prod.mk_vadd_mk
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
255
256
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
fst_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').1 = p₁.1 -ᵥ p₂.1 := rfl
fst_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').1 = p₁.1 -ᵥ p₂.1
rfl
lemma
prod.fst_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
258
258
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
snd_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').2 = p₁.2 -ᵥ p₂.2 := rfl
snd_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').2 = p₁.2 -ᵥ p₂.2
rfl
lemma
prod.snd_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
259
259
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mk_vsub_mk (p₁ p₂ : P) (p₁' p₂' : P') : ((p₁, p₁') -ᵥ (p₂, p₂') : G × G') = (p₁ -ᵥ p₂, p₁' -ᵥ p₂') := rfl
mk_vsub_mk (p₁ p₂ : P) (p₁' p₂' : P') : ((p₁, p₁') -ᵥ (p₂, p₂') : G × G') = (p₁ -ᵥ p₂, p₁' -ᵥ p₂')
rfl
lemma
prod.mk_vsub_mk
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
260
261
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
[T : ∀ i, add_torsor (fg i) (fp i)] : add_torsor (Π i, fg i) (Π i, fp i) := { vadd := λ g p, λ i, g i +ᵥ p i, zero_vadd := λ p, funext $ λ i, zero_vadd (fg i) (p i), add_vadd := λ g₁ g₂ p, funext $ λ i, add_vadd (g₁ i) (g₂ i) (p i), vsub := λ p₁ p₂, λ i, p₁ i -ᵥ p₂ i, nonempty := ⟨λ i, classical.choice (T i).no...
[T : ∀ i, add_torsor (fg i) (fp i)] : add_torsor (Π i, fg i) (Π i, fp i)
{ vadd := λ g p, λ i, g i +ᵥ p i, zero_vadd := λ p, funext $ λ i, zero_vadd (fg i) (p i), add_vadd := λ g₁ g₂ p, funext $ λ i, add_vadd (g₁ i) (g₂ i) (p i), vsub := λ p₁ p₂, λ i, p₁ i -ᵥ p₂ i, nonempty := ⟨λ i, classical.choice (T i).nonempty⟩, vsub_vadd' := λ p₁ p₂, funext $ λ i, vsub_vadd (p₁ i) (p₂ i), v...
instance
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_torsor", "vadd_vsub", "vsub_vadd" ]
A product of `add_torsor`s is an `add_torsor`.
273
280
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
vadd_const (p : P) : G ≃ P := { to_fun := λ v, v +ᵥ p, inv_fun := λ p', p' -ᵥ p, left_inv := λ v, vadd_vsub _ _, right_inv := λ p', vsub_vadd _ _ }
vadd_const (p : P) : G ≃ P
{ to_fun := λ v, v +ᵥ p, inv_fun := λ p', p' -ᵥ p, left_inv := λ v, vadd_vsub _ _, right_inv := λ p', vsub_vadd _ _ }
def
equiv.vadd_const
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "inv_fun", "vadd_vsub", "vsub_vadd" ]
`v ↦ v +ᵥ p` as an equivalence.
291
295
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_vadd_const (p : P) : ⇑(vadd_const p) = λ v, v+ᵥ p := rfl
coe_vadd_const (p : P) : ⇑(vadd_const p) = λ v, v+ᵥ p
rfl
lemma
equiv.coe_vadd_const
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
297
297
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_vadd_const_symm (p : P) : ⇑(vadd_const p).symm = λ p', p' -ᵥ p := rfl
coe_vadd_const_symm (p : P) : ⇑(vadd_const p).symm = λ p', p' -ᵥ p
rfl
lemma
equiv.coe_vadd_const_symm
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
299
299
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_vsub (p : P) : P ≃ G := { to_fun := (-ᵥ) p, inv_fun := λ v, -v +ᵥ p, left_inv := λ p', by simp, right_inv := λ v, by simp [vsub_vadd_eq_vsub_sub] }
const_vsub (p : P) : P ≃ G
{ to_fun := (-ᵥ) p, inv_fun := λ v, -v +ᵥ p, left_inv := λ p', by simp, right_inv := λ v, by simp [vsub_vadd_eq_vsub_sub] }
def
equiv.const_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "inv_fun", "vsub_vadd_eq_vsub_sub" ]
`p' ↦ p -ᵥ p'` as an equivalence.
302
306
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_const_vsub (p : P) : ⇑(const_vsub p) = (-ᵥ) p := rfl
coe_const_vsub (p : P) : ⇑(const_vsub p) = (-ᵥ) p
rfl
lemma
equiv.coe_const_vsub
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
308
308
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_const_vsub_symm (p : P) : ⇑(const_vsub p).symm = λ v, -v +ᵥ p := rfl
coe_const_vsub_symm (p : P) : ⇑(const_vsub p).symm = λ v, -v +ᵥ p
rfl
lemma
equiv.coe_const_vsub_symm
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
310
310
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_vadd (v : G) : equiv.perm P := { to_fun := (+ᵥ) v, inv_fun := (+ᵥ) (-v), left_inv := λ p, by simp [vadd_vadd], right_inv := λ p, by simp [vadd_vadd] }
const_vadd (v : G) : equiv.perm P
{ to_fun := (+ᵥ) v, inv_fun := (+ᵥ) (-v), left_inv := λ p, by simp [vadd_vadd], right_inv := λ p, by simp [vadd_vadd] }
def
equiv.const_vadd
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "equiv.perm", "inv_fun" ]
The permutation given by `p ↦ v +ᵥ p`.
315
319
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_const_vadd (v : G) : ⇑(const_vadd P v) = (+ᵥ) v := rfl
coe_const_vadd (v : G) : ⇑(const_vadd P v) = (+ᵥ) v
rfl
lemma
equiv.coe_const_vadd
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
321
321
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_vadd_zero : const_vadd P (0:G) = 1 := ext $ zero_vadd G
const_vadd_zero : const_vadd P (0:G) = 1
ext $ zero_vadd G
lemma
equiv.const_vadd_zero
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
325
325
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_vadd_add (v₁ v₂ : G) : const_vadd P (v₁ + v₂) = const_vadd P v₁ * const_vadd P v₂ := ext $ add_vadd v₁ v₂
const_vadd_add (v₁ v₂ : G) : const_vadd P (v₁ + v₂) = const_vadd P v₁ * const_vadd P v₂
ext $ add_vadd v₁ v₂
lemma
equiv.const_vadd_add
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
329
331
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
const_vadd_hom : multiplicative G →* equiv.perm P := { to_fun := λ v, const_vadd P v.to_add, map_one' := const_vadd_zero G P, map_mul' := const_vadd_add P }
const_vadd_hom : multiplicative G →* equiv.perm P
{ to_fun := λ v, const_vadd P v.to_add, map_one' := const_vadd_zero G P, map_mul' := const_vadd_add P }
def
equiv.const_vadd_hom
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "equiv.perm", "multiplicative" ]
`equiv.const_vadd` as a homomorphism from `multiplicative G` to `equiv.perm P`
334
337
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection (x : P) : perm P := (const_vsub x).trans (vadd_const x)
point_reflection (x : P) : perm P
(const_vsub x).trans (vadd_const x)
def
equiv.point_reflection
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
Point reflection in `x` as a permutation.
344
344
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection_apply (x y : P) : point_reflection x y = x -ᵥ y +ᵥ x := rfl
point_reflection_apply (x y : P) : point_reflection x y = x -ᵥ y +ᵥ x
rfl
lemma
equiv.point_reflection_apply
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
346
346
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection_symm (x : P) : (point_reflection x).symm = point_reflection x := ext $ by simp [point_reflection]
point_reflection_symm (x : P) : (point_reflection x).symm = point_reflection x
ext $ by simp [point_reflection]
lemma
equiv.point_reflection_symm
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[]
null
348
349
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection_self (x : P) : point_reflection x x = x := vsub_vadd _ _
point_reflection_self (x : P) : point_reflection x x = x
vsub_vadd _ _
lemma
equiv.point_reflection_self
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "vsub_vadd" ]
null
351
351
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection_involutive (x : P) : involutive (point_reflection x : P → P) := λ y, (equiv.apply_eq_iff_eq_symm_apply _).2 $ by rw point_reflection_symm
point_reflection_involutive (x : P) : involutive (point_reflection x : P → P)
λ y, (equiv.apply_eq_iff_eq_symm_apply _).2 $ by rw point_reflection_symm
lemma
equiv.point_reflection_involutive
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "equiv.apply_eq_iff_eq_symm_apply", "involutive" ]
null
353
354
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
point_reflection_fixed_iff_of_injective_bit0 {x y : P} (h : injective (bit0 : G → G)) : point_reflection x y = y ↔ y = x := by rw [point_reflection_apply, eq_comm, eq_vadd_iff_vsub_eq, ← neg_vsub_eq_vsub_rev, neg_eq_iff_add_eq_zero, ← bit0, ← bit0_zero, h.eq_iff, vsub_eq_zero_iff_eq, eq_comm]
point_reflection_fixed_iff_of_injective_bit0 {x y : P} (h : injective (bit0 : G → G)) : point_reflection x y = y ↔ y = x
by rw [point_reflection_apply, eq_comm, eq_vadd_iff_vsub_eq, ← neg_vsub_eq_vsub_rev, neg_eq_iff_add_eq_zero, ← bit0, ← bit0_zero, h.eq_iff, vsub_eq_zero_iff_eq, eq_comm]
lemma
equiv.point_reflection_fixed_iff_of_injective_bit0
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "bit0_zero", "eq_vadd_iff_vsub_eq", "neg_vsub_eq_vsub_rev", "vsub_eq_zero_iff_eq" ]
`x` is the only fixed point of `point_reflection x`. This lemma requires `x + x = y + y ↔ x = y`. There is no typeclass to use here, so we add it as an explicit argument.
358
361
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
injective_point_reflection_left_of_injective_bit0 {G P : Type*} [add_comm_group G] [add_torsor G P] (h : injective (bit0 : G → G)) (y : P) : injective (λ x : P, point_reflection x y) := λ x₁ x₂ (hy : point_reflection x₁ y = point_reflection x₂ y), by rwa [point_reflection_apply, point_reflection_apply, vadd_eq_va...
injective_point_reflection_left_of_injective_bit0 {G P : Type*} [add_comm_group G] [add_torsor G P] (h : injective (bit0 : G → G)) (y : P) : injective (λ x : P, point_reflection x y)
λ x₁ x₂ (hy : point_reflection x₁ y = point_reflection x₂ y), by rwa [point_reflection_apply, point_reflection_apply, vadd_eq_vadd_iff_sub_eq_vsub, vsub_sub_vsub_cancel_right, ← neg_vsub_eq_vsub_rev, neg_eq_iff_add_eq_zero, ← bit0, ← bit0_zero, h.eq_iff, vsub_eq_zero_iff_eq] at hy
lemma
equiv.injective_point_reflection_left_of_injective_bit0
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_comm_group", "add_torsor", "bit0_zero", "neg_vsub_eq_vsub_rev", "vadd_eq_vadd_iff_sub_eq_vsub", "vsub_eq_zero_iff_eq", "vsub_sub_vsub_cancel_right" ]
null
365
371
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
add_torsor.subsingleton_iff (G P : Type*) [add_group G] [add_torsor G P] : subsingleton G ↔ subsingleton P := begin inhabit P, exact (equiv.vadd_const default).subsingleton_congr, end
add_torsor.subsingleton_iff (G P : Type*) [add_group G] [add_torsor G P] : subsingleton G ↔ subsingleton P
begin inhabit P, exact (equiv.vadd_const default).subsingleton_congr, end
lemma
add_torsor.subsingleton_iff
algebra
src/algebra/add_torsor.lean
[ "data.set.pointwise.smul" ]
[ "add_group", "add_torsor", "equiv.vadd_const" ]
null
375
380
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
infinite_of_char_zero (R A : Type*) [comm_ring R] [is_domain R] [ring A] [algebra R A] [char_zero A] : {x : A | is_algebraic R x}.infinite := infinite_of_injective_forall_mem nat.cast_injective is_algebraic_nat
infinite_of_char_zero (R A : Type*) [comm_ring R] [is_domain R] [ring A] [algebra R A] [char_zero A] : {x : A | is_algebraic R x}.infinite
infinite_of_injective_forall_mem nat.cast_injective is_algebraic_nat
lemma
algebraic.infinite_of_char_zero
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "algebra", "char_zero", "comm_ring", "infinite", "is_algebraic", "is_algebraic_nat", "is_domain", "nat.cast_injective", "ring" ]
null
30
32
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
aleph_0_le_cardinal_mk_of_char_zero (R A : Type*) [comm_ring R] [is_domain R] [ring A] [algebra R A] [char_zero A] : ℵ₀ ≤ #{x : A // is_algebraic R x} := infinite_iff.1 (set.infinite_coe_iff.2 $ infinite_of_char_zero R A)
aleph_0_le_cardinal_mk_of_char_zero (R A : Type*) [comm_ring R] [is_domain R] [ring A] [algebra R A] [char_zero A] : ℵ₀ ≤ #{x : A // is_algebraic R x}
infinite_iff.1 (set.infinite_coe_iff.2 $ infinite_of_char_zero R A)
theorem
algebraic.aleph_0_le_cardinal_mk_of_char_zero
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "algebra", "char_zero", "comm_ring", "is_algebraic", "is_domain", "ring" ]
null
34
36
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_lift_le_mul : cardinal.lift.{u} (#{x : A // is_algebraic R x}) ≤ cardinal.lift.{v} #(R[X]) * ℵ₀ := begin rw [←mk_ulift, ←mk_ulift], choose g hg₁ hg₂ using λ x : {x : A | is_algebraic R x}, x.coe_prop, refine lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g (λ f, _), rw [lift_le_aleph_0, le_aleph_0_...
cardinal_mk_lift_le_mul : cardinal.lift.{u} (#{x : A // is_algebraic R x}) ≤ cardinal.lift.{v} #(R[X]) * ℵ₀
begin rw [←mk_ulift, ←mk_ulift], choose g hg₁ hg₂ using λ x : {x : A | is_algebraic R x}, x.coe_prop, refine lift_mk_le_lift_mk_mul_of_lift_mk_preimage_le g (λ f, _), rw [lift_le_aleph_0, le_aleph_0_iff_set_countable], suffices : maps_to coe (g ⁻¹' {f}) (f.root_set A), from this.countable_of_inj_on (subty...
theorem
algebraic.cardinal_mk_lift_le_mul
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "countable", "is_algebraic" ]
null
43
54
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_lift_le_max : cardinal.lift.{u} (#{x : A // is_algebraic R x}) ≤ max (cardinal.lift.{v} (#R)) ℵ₀ := (cardinal_mk_lift_le_mul R A).trans $ (mul_le_mul_right' (lift_le.2 cardinal_mk_le_max) _).trans $ by simp
cardinal_mk_lift_le_max : cardinal.lift.{u} (#{x : A // is_algebraic R x}) ≤ max (cardinal.lift.{v} (#R)) ℵ₀
(cardinal_mk_lift_le_mul R A).trans $ (mul_le_mul_right' (lift_le.2 cardinal_mk_le_max) _).trans $ by simp
theorem
algebraic.cardinal_mk_lift_le_max
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "is_algebraic", "mul_le_mul_right'" ]
null
56
59
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_lift_of_infinite [infinite R] : cardinal.lift.{u} (#{x : A // is_algebraic R x}) = cardinal.lift.{v} (#R) := ((cardinal_mk_lift_le_max R A).trans_eq (max_eq_left $ aleph_0_le_mk _)).antisymm $ lift_mk_le'.2 ⟨⟨λ x, ⟨algebra_map R A x, is_algebraic_algebra_map _⟩, λ x y h, no_zero_smul_divisors.algebr...
cardinal_mk_lift_of_infinite [infinite R] : cardinal.lift.{u} (#{x : A // is_algebraic R x}) = cardinal.lift.{v} (#R)
((cardinal_mk_lift_le_max R A).trans_eq (max_eq_left $ aleph_0_le_mk _)).antisymm $ lift_mk_le'.2 ⟨⟨λ x, ⟨algebra_map R A x, is_algebraic_algebra_map _⟩, λ x y h, no_zero_smul_divisors.algebra_map_injective R A (subtype.ext_iff.1 h)⟩⟩
lemma
algebraic.cardinal_mk_lift_of_infinite
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "infinite", "is_algebraic", "is_algebraic_algebra_map", "no_zero_smul_divisors.algebra_map_injective" ]
null
61
65
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
countable : set.countable {x : A | is_algebraic R x} := begin rw [←le_aleph_0_iff_set_countable, ←lift_le], apply (cardinal_mk_lift_le_max R A).trans, simp end
countable : set.countable {x : A | is_algebraic R x}
begin rw [←le_aleph_0_iff_set_countable, ←lift_le], apply (cardinal_mk_lift_le_max R A).trans, simp end
theorem
algebraic.countable
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "countable", "is_algebraic", "set.countable" ]
null
69
74
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_of_countble_of_char_zero [char_zero A] [is_domain R] : #{x : A // is_algebraic R x} = ℵ₀ := (algebraic.countable R A).le_aleph_0.antisymm (aleph_0_le_cardinal_mk_of_char_zero R A)
cardinal_mk_of_countble_of_char_zero [char_zero A] [is_domain R] : #{x : A // is_algebraic R x} = ℵ₀
(algebraic.countable R A).le_aleph_0.antisymm (aleph_0_le_cardinal_mk_of_char_zero R A)
theorem
algebraic.cardinal_mk_of_countble_of_char_zero
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "algebraic.countable", "char_zero", "is_algebraic", "is_domain" ]
null
76
78
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_le_mul : #{x : A // is_algebraic R x} ≤ #R[X] * ℵ₀ := by { rw [←lift_id (#_), ←lift_id #R[X]], exact cardinal_mk_lift_le_mul R A }
cardinal_mk_le_mul : #{x : A // is_algebraic R x} ≤ #R[X] * ℵ₀
by { rw [←lift_id (#_), ←lift_id #R[X]], exact cardinal_mk_lift_le_mul R A }
theorem
algebraic.cardinal_mk_le_mul
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "is_algebraic" ]
null
87
88
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_le_max : #{x : A // is_algebraic R x} ≤ max (#R) ℵ₀ := by { rw [←lift_id (#_), ←lift_id (#R)], exact cardinal_mk_lift_le_max R A }
cardinal_mk_le_max : #{x : A // is_algebraic R x} ≤ max (#R) ℵ₀
by { rw [←lift_id (#_), ←lift_id (#R)], exact cardinal_mk_lift_le_max R A }
theorem
algebraic.cardinal_mk_le_max
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "is_algebraic" ]
null
90
91
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cardinal_mk_of_infinite [infinite R] : #{x : A // is_algebraic R x} = #R := lift_inj.1 $ cardinal_mk_lift_of_infinite R A
cardinal_mk_of_infinite [infinite R] : #{x : A // is_algebraic R x} = #R
lift_inj.1 $ cardinal_mk_lift_of_infinite R A
theorem
algebraic.cardinal_mk_of_infinite
algebra
src/algebra/algebraic_card.lean
[ "data.polynomial.cardinal", "ring_theory.algebraic" ]
[ "infinite", "is_algebraic" ]
null
93
94
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime (p : α) : Prop := p ≠ 0 ∧ ¬ is_unit p ∧ (∀a b, p ∣ a * b → p ∣ a ∨ p ∣ b)
prime (p : α) : Prop
p ≠ 0 ∧ ¬ is_unit p ∧ (∀a b, p ∣ a * b → p ∣ a ∨ p ∣ b)
def
prime
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit" ]
prime element of a `comm_monoid_with_zero`
23
24
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ne_zero : p ≠ 0 := hp.1
ne_zero : p ≠ 0
hp.1
lemma
prime.ne_zero
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "ne_zero" ]
null
30
31
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_unit : ¬ is_unit p := hp.2.1
not_unit : ¬ is_unit p
hp.2.1
lemma
prime.not_unit
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit" ]
null
33
34
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_dvd_one : ¬ p ∣ 1 := mt (is_unit_of_dvd_one _) hp.not_unit
not_dvd_one : ¬ p ∣ 1
mt (is_unit_of_dvd_one _) hp.not_unit
lemma
prime.not_dvd_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit_of_dvd_one" ]
null
36
37
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ne_one : p ≠ 1 := λ h, hp.2.1 (h.symm ▸ is_unit_one)
ne_one : p ≠ 1
λ h, hp.2.1 (h.symm ▸ is_unit_one)
lemma
prime.ne_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit_one" ]
null
39
40
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_or_dvd (hp : prime p) {a b : α} (h : p ∣ a * b) : p ∣ a ∨ p ∣ b := hp.2.2 a b h
dvd_or_dvd (hp : prime p) {a b : α} (h : p ∣ a * b) : p ∣ a ∨ p ∣ b
hp.2.2 a b h
lemma
prime.dvd_or_dvd
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "prime" ]
null
42
44
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
dvd_of_dvd_pow (hp : prime p) {a : α} {n : ℕ} (h : p ∣ a^n) : p ∣ a := begin induction n with n ih, { rw pow_zero at h, have := is_unit_of_dvd_one _ h, have := not_unit hp, contradiction }, rw pow_succ at h, cases dvd_or_dvd hp h with dvd_a dvd_pow, { assumption }, exact ih dvd_pow end
dvd_of_dvd_pow (hp : prime p) {a : α} {n : ℕ} (h : p ∣ a^n) : p ∣ a
begin induction n with n ih, { rw pow_zero at h, have := is_unit_of_dvd_one _ h, have := not_unit hp, contradiction }, rw pow_succ at h, cases dvd_or_dvd hp h with dvd_a dvd_pow, { assumption }, exact ih dvd_pow end
lemma
prime.dvd_of_dvd_pow
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "dvd_pow", "ih", "is_unit_of_dvd_one", "pow_succ", "pow_zero", "prime" ]
null
46
58
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_prime_zero : ¬ prime (0 : α) := λ h, h.ne_zero rfl
not_prime_zero : ¬ prime (0 : α)
λ h, h.ne_zero rfl
lemma
not_prime_zero
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "prime" ]
null
62
63
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_prime_one : ¬ prime (1 : α) := λ h, h.not_unit is_unit_one
not_prime_one : ¬ prime (1 : α)
λ h, h.not_unit is_unit_one
lemma
not_prime_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit_one", "prime" ]
null
65
66
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
comap_prime (hinv : ∀ a, g (f a : β) = a) (hp : prime (f p)) : prime p := ⟨ λ h, hp.1 $ by simp [h], λ h, hp.2.1 $ h.map f, λ a b h, by { refine (hp.2.2 (f a) (f b) $ by { convert map_dvd f h, simp }).imp _ _; { intro h, convert ← map_dvd g h; apply hinv } } ⟩
comap_prime (hinv : ∀ a, g (f a : β) = a) (hp : prime (f p)) : prime p
⟨ λ h, hp.1 $ by simp [h], λ h, hp.2.1 $ h.map f, λ a b h, by { refine (hp.2.2 (f a) (f b) $ by { convert map_dvd f h, simp }).imp _ _; { intro h, convert ← map_dvd g h; apply hinv } } ⟩
lemma
comap_prime
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "map_dvd", "prime" ]
null
72
75
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mul_equiv.prime_iff (e : α ≃* β) : prime p ↔ prime (e p) := ⟨ λ h, comap_prime e.symm e (λ a, by simp) $ (e.symm_apply_apply p).substr h, comap_prime e e.symm (λ a, by simp) ⟩
mul_equiv.prime_iff (e : α ≃* β) : prime p ↔ prime (e p)
⟨ λ h, comap_prime e.symm e (λ a, by simp) $ (e.symm_apply_apply p).substr h, comap_prime e e.symm (λ a, by simp) ⟩
lemma
mul_equiv.prime_iff
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "comap_prime", "prime" ]
null
77
79
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime.left_dvd_or_dvd_right_of_dvd_mul [cancel_comm_monoid_with_zero α] {p : α} (hp : prime p) {a b : α} : a ∣ p * b → p ∣ a ∨ a ∣ b := begin rintro ⟨c, hc⟩, rcases hp.2.2 a c (hc ▸ dvd_mul_right _ _) with h | ⟨x, rfl⟩, { exact or.inl h }, { rw [mul_left_comm, mul_right_inj' hp.ne_zero] at hc, exact or.in...
prime.left_dvd_or_dvd_right_of_dvd_mul [cancel_comm_monoid_with_zero α] {p : α} (hp : prime p) {a b : α} : a ∣ p * b → p ∣ a ∨ a ∣ b
begin rintro ⟨c, hc⟩, rcases hp.2.2 a c (hc ▸ dvd_mul_right _ _) with h | ⟨x, rfl⟩, { exact or.inl h }, { rw [mul_left_comm, mul_right_inj' hp.ne_zero] at hc, exact or.inr (hc.symm ▸ dvd_mul_right _ _) } end
lemma
prime.left_dvd_or_dvd_right_of_dvd_mul
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "cancel_comm_monoid_with_zero", "dvd_mul_right", "mul_left_comm", "mul_right_inj'", "prime" ]
null
85
93
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime.pow_dvd_of_dvd_mul_left [cancel_comm_monoid_with_zero α] {p a b : α} (hp : prime p) (n : ℕ) (h : ¬p ∣ a) (h' : p ^ n ∣ a * b) : p ^ n ∣ b := begin induction n with n ih, { rw pow_zero, exact one_dvd b }, { obtain ⟨c, rfl⟩ := ih (dvd_trans (pow_dvd_pow p n.le_succ) h'), rw pow_succ', apply mul_dv...
prime.pow_dvd_of_dvd_mul_left [cancel_comm_monoid_with_zero α] {p a b : α} (hp : prime p) (n : ℕ) (h : ¬p ∣ a) (h' : p ^ n ∣ a * b) : p ^ n ∣ b
begin induction n with n ih, { rw pow_zero, exact one_dvd b }, { obtain ⟨c, rfl⟩ := ih (dvd_trans (pow_dvd_pow p n.le_succ) h'), rw pow_succ', apply mul_dvd_mul_left _ ((hp.dvd_or_dvd _).resolve_left h), rwa [←mul_dvd_mul_iff_left (pow_ne_zero n hp.ne_zero), ←pow_succ', mul_left_comm] } end
lemma
prime.pow_dvd_of_dvd_mul_left
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "cancel_comm_monoid_with_zero", "dvd_trans", "ih", "mul_dvd_mul_left", "mul_left_comm", "one_dvd", "pow_dvd_pow", "pow_ne_zero", "pow_succ'", "pow_zero", "prime" ]
null
95
105
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime.pow_dvd_of_dvd_mul_right [cancel_comm_monoid_with_zero α] {p a b : α} (hp : prime p) (n : ℕ) (h : ¬p ∣ b) (h' : p ^ n ∣ a * b) : p ^ n ∣ a := by { rw [mul_comm] at h', exact hp.pow_dvd_of_dvd_mul_left n h h' }
prime.pow_dvd_of_dvd_mul_right [cancel_comm_monoid_with_zero α] {p a b : α} (hp : prime p) (n : ℕ) (h : ¬p ∣ b) (h' : p ^ n ∣ a * b) : p ^ n ∣ a
by { rw [mul_comm] at h', exact hp.pow_dvd_of_dvd_mul_left n h h' }
lemma
prime.pow_dvd_of_dvd_mul_right
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "cancel_comm_monoid_with_zero", "mul_comm", "prime" ]
null
107
110
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd [cancel_comm_monoid_with_zero α] {p a b : α} {n : ℕ} (hp : prime p) (hpow : p ^ n.succ ∣ a ^ n.succ * b ^ n) (hb : ¬ p ^ 2 ∣ b) : p ∣ a := begin -- Suppose `p ∣ b`, write `b = p * x` and `hy : a ^ n.succ * b ^ n = p ^ n.succ * y`. cases (hp.dvd_or_dvd ((dvd_pow...
prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd [cancel_comm_monoid_with_zero α] {p a b : α} {n : ℕ} (hp : prime p) (hpow : p ^ n.succ ∣ a ^ n.succ * b ^ n) (hb : ¬ p ^ 2 ∣ b) : p ∣ a
begin -- Suppose `p ∣ b`, write `b = p * x` and `hy : a ^ n.succ * b ^ n = p ^ n.succ * y`. cases (hp.dvd_or_dvd ((dvd_pow_self p (nat.succ_ne_zero n)).trans hpow)) with H hbdiv, { exact hp.dvd_of_dvd_pow H }, obtain ⟨x, rfl⟩ := hp.dvd_of_dvd_pow hbdiv, obtain ⟨y, hy⟩ := hpow, -- Then we can divide out a co...
lemma
prime.dvd_of_pow_dvd_pow_mul_pow_of_square_not_dvd
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "cancel_comm_monoid_with_zero", "dvd_mul_right", "dvd_pow_self", "mul_assoc", "mul_comm", "mul_left_cancel₀", "mul_pow", "pow_ne_zero", "pow_succ'", "pow_two", "prime" ]
null
112
131
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prime_pow_succ_dvd_mul {α : Type*} [cancel_comm_monoid_with_zero α] {p x y : α} (h : prime p) {i : ℕ} (hxy : p ^ (i + 1) ∣ x * y) : p ^ (i + 1) ∣ x ∨ p ∣ y := begin rw or_iff_not_imp_right, intro hy, induction i with i ih generalizing x, { simp only [zero_add, pow_one] at *, exact (h.dvd_or_dvd hxy).res...
prime_pow_succ_dvd_mul {α : Type*} [cancel_comm_monoid_with_zero α] {p x y : α} (h : prime p) {i : ℕ} (hxy : p ^ (i + 1) ∣ x * y) : p ^ (i + 1) ∣ x ∨ p ∣ y
begin rw or_iff_not_imp_right, intro hy, induction i with i ih generalizing x, { simp only [zero_add, pow_one] at *, exact (h.dvd_or_dvd hxy).resolve_right hy }, rw pow_succ at hxy ⊢, obtain ⟨x', rfl⟩ := (h.dvd_or_dvd (dvd_of_mul_right_dvd hxy)).resolve_right hy, rw mul_assoc at hxy, exact mul_dvd_m...
lemma
prime_pow_succ_dvd_mul
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "cancel_comm_monoid_with_zero", "dvd_of_mul_right_dvd", "ih", "mul_assoc", "mul_dvd_mul_iff_left", "mul_dvd_mul_left", "or_iff_not_imp_right", "pow_one", "pow_succ", "prime" ]
null
133
146
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
irreducible [monoid α] (p : α) : Prop := (not_unit : ¬ is_unit p) (is_unit_or_is_unit' : ∀a b, p = a * b → is_unit a ∨ is_unit b)
irreducible [monoid α] (p : α) : Prop
(not_unit : ¬ is_unit p) (is_unit_or_is_unit' : ∀a b, p = a * b → is_unit a ∨ is_unit b)
structure
irreducible
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "is_unit", "monoid" ]
`irreducible p` states that `p` is non-unit and only factors into units. We explicitly avoid stating that `p` is non-zero, this would require a semiring. Assuming only a monoid allows us to reuse irreducible for associated elements.
153
155
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_dvd_one [comm_monoid α] {p : α} (hp : irreducible p) : ¬ p ∣ 1 := mt (is_unit_of_dvd_one _) hp.not_unit
not_dvd_one [comm_monoid α] {p : α} (hp : irreducible p) : ¬ p ∣ 1
mt (is_unit_of_dvd_one _) hp.not_unit
lemma
irreducible.not_dvd_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "comm_monoid", "irreducible", "is_unit_of_dvd_one" ]
null
159
160
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_unit_or_is_unit [monoid α] {p : α} (hp : irreducible p) {a b : α} (h : p = a * b) : is_unit a ∨ is_unit b := hp.is_unit_or_is_unit' a b h
is_unit_or_is_unit [monoid α] {p : α} (hp : irreducible p) {a b : α} (h : p = a * b) : is_unit a ∨ is_unit b
hp.is_unit_or_is_unit' a b h
lemma
irreducible.is_unit_or_is_unit
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "is_unit", "monoid" ]
null
162
164
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
irreducible_iff [monoid α] {p : α} : irreducible p ↔ ¬ is_unit p ∧ ∀a b, p = a * b → is_unit a ∨ is_unit b := ⟨λ h, ⟨h.1, h.2⟩, λ h, ⟨h.1, h.2⟩⟩
irreducible_iff [monoid α] {p : α} : irreducible p ↔ ¬ is_unit p ∧ ∀a b, p = a * b → is_unit a ∨ is_unit b
⟨λ h, ⟨h.1, h.2⟩, λ h, ⟨h.1, h.2⟩⟩
lemma
irreducible_iff
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "is_unit", "monoid" ]
null
168
170
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_irreducible_one [monoid α] : ¬ irreducible (1 : α) := by simp [irreducible_iff]
not_irreducible_one [monoid α] : ¬ irreducible (1 : α)
by simp [irreducible_iff]
theorem
not_irreducible_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "irreducible_iff", "monoid" ]
null
172
173
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
irreducible.ne_one [monoid α] : ∀ {p:α}, irreducible p → p ≠ 1 | _ hp rfl := not_irreducible_one hp
irreducible.ne_one [monoid α] : ∀ {p:α}, irreducible p → p ≠ 1 | _ hp rfl
not_irreducible_one hp
theorem
irreducible.ne_one
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "monoid", "not_irreducible_one" ]
null
175
176
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_irreducible_zero [monoid_with_zero α] : ¬ irreducible (0 : α) | ⟨hn0, h⟩ := have is_unit (0:α) ∨ is_unit (0:α), from h 0 0 ((mul_zero 0).symm), this.elim hn0 hn0
not_irreducible_zero [monoid_with_zero α] : ¬ irreducible (0 : α) | ⟨hn0, h⟩
have is_unit (0:α) ∨ is_unit (0:α), from h 0 0 ((mul_zero 0).symm), this.elim hn0 hn0
theorem
not_irreducible_zero
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "is_unit", "monoid_with_zero", "mul_zero" ]
null
178
180
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
irreducible.ne_zero [monoid_with_zero α] : ∀ {p:α}, irreducible p → p ≠ 0 | _ hp rfl := not_irreducible_zero hp
irreducible.ne_zero [monoid_with_zero α] : ∀ {p:α}, irreducible p → p ≠ 0 | _ hp rfl
not_irreducible_zero hp
theorem
irreducible.ne_zero
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "monoid_with_zero", "not_irreducible_zero" ]
null
182
183
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_irreducible_mul {α} [monoid α] {x y : α} : irreducible (x * y) → is_unit x ∨ is_unit y | ⟨_, h⟩ := h _ _ rfl
of_irreducible_mul {α} [monoid α] {x y : α} : irreducible (x * y) → is_unit x ∨ is_unit y | ⟨_, h⟩
h _ _ rfl
theorem
of_irreducible_mul
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "is_unit", "monoid" ]
null
185
187
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_irreducible_pow {α} [monoid α] {x : α} {n : ℕ} (hn : n ≠ 1) : irreducible (x ^ n) → is_unit x := begin obtain hn|hn := hn.lt_or_lt, { simp only [nat.lt_one_iff.mp hn, is_empty.forall_iff, not_irreducible_one, pow_zero] }, intro h, obtain ⟨k, rfl⟩ := nat.exists_eq_add_of_lt hn, rw [pow_succ, add_comm] at ...
of_irreducible_pow {α} [monoid α] {x : α} {n : ℕ} (hn : n ≠ 1) : irreducible (x ^ n) → is_unit x
begin obtain hn|hn := hn.lt_or_lt, { simp only [nat.lt_one_iff.mp hn, is_empty.forall_iff, not_irreducible_one, pow_zero] }, intro h, obtain ⟨k, rfl⟩ := nat.exists_eq_add_of_lt hn, rw [pow_succ, add_comm] at h, exact (or_iff_left_of_imp is_unit_pow_succ_iff.mp).mp (of_irreducible_mul h) end
theorem
of_irreducible_pow
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "irreducible", "is_empty.forall_iff", "is_unit", "monoid", "nat.exists_eq_add_of_lt", "not_irreducible_one", "of_irreducible_mul", "pow_succ", "pow_zero" ]
null
189
198
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
irreducible_or_factor {α} [monoid α] (x : α) (h : ¬ is_unit x) : irreducible x ∨ ∃ a b, ¬ is_unit a ∧ ¬ is_unit b ∧ a * b = x := begin haveI := classical.dec, refine or_iff_not_imp_right.2 (λ H, _), simp [h, irreducible_iff] at H ⊢, refine λ a b h, classical.by_contradiction $ λ o, _, simp [not_or_distrib] ...
irreducible_or_factor {α} [monoid α] (x : α) (h : ¬ is_unit x) : irreducible x ∨ ∃ a b, ¬ is_unit a ∧ ¬ is_unit b ∧ a * b = x
begin haveI := classical.dec, refine or_iff_not_imp_right.2 (λ H, _), simp [h, irreducible_iff] at H ⊢, refine λ a b h, classical.by_contradiction $ λ o, _, simp [not_or_distrib] at o, exact H _ o.1 _ o.2 h.symm end
theorem
irreducible_or_factor
algebra
src/algebra/associated.lean
[ "algebra.divisibility.basic", "algebra.group_power.lemmas", "algebra.parity" ]
[ "classical.dec", "irreducible", "irreducible_iff", "is_unit", "monoid", "not_or_distrib" ]
null
200
209
true
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
End of preview. Expand in Data Studio

Lean3-Mathlib

Declarations from mathlib3, the Lean 3 mathematical library (archived).

Source

Schema

Column Type Description
fact string Verbatim declaration with the leading keyword removed: signature and body/proof joined
statement string Signature with the leading keyword removed (verbatim slice)
proof string Verbatim proof/body, empty if none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, null if absent
line_start int First source line
line_end int Last source line
has_proof bool Whether a proof block was captured
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 133,201
  • With proof: 132,770 (99.7%)
  • With docstring: 35,100 (26.4%)
  • Libraries: 417

By type

Type Count
lemma 83,206
def 19,387
theorem 14,273
instance 13,632
class 1,010
structure 732
abbreviation 496
inductive 252
example 199
definition 10
class inductive 3
macro 1

Example

add_torsor (G : out_param Type*) (P : Type*) [out_param $ add_group G]
  extends add_action G P, has_vsub G P :=
[nonempty : nonempty P]
(vsub_vadd' : ∀ (p1 p2 : P), (p1 -ᵥ p2 : G) +ᵥ p2 = p1)
(vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g)
  • type: class | symbolic_name: add_torsor | src/algebra/add_torsor.lean:48

Use

Statement and proof are available both joined (fact) and split (statement, proof) for proof-term modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{lean3_mathlib_dataset,
  title  = {Lean3-Mathlib},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://github.com/leanprover-community/mathlib, commit 65a1391a0106},
  url    = {https://huggingface.co/datasets/phanerozoic/Lean3-Mathlib}
}
Downloads last month
-

Collection including phanerozoic/Lean3-Mathlib