mathlib documentation

algebra.field

@[instance]
def division_ring.to_nontrivial (K : Type u) [s : division_ring K] :

@[instance]

@[class]
structure division_ring (K : Type u) :
Type u
  • add : K → K → K
  • add_assoc : ∀ (a b c_1 : K), a + b + c_1 = a + (b + c_1)
  • zero : K
  • zero_add : ∀ (a : K), 0 + a = a
  • add_zero : ∀ (a : K), a + 0 = a
  • neg : K → K
  • sub : K → K → K
  • sub_eq_add_neg : (∀ (a b : K), a - b = a + -b) . "try_refl_tac"
  • add_left_neg : ∀ (a : K), -a + a = 0
  • add_comm : ∀ (a b : K), a + b = b + a
  • mul : K → K → K
  • mul_assoc : ∀ (a b c_1 : K), (a * b) * c_1 = a * b * c_1
  • one : K
  • one_mul : ∀ (a : K), 1 * a = a
  • mul_one : ∀ (a : K), a * 1 = a
  • left_distrib : ∀ (a b c_1 : K), a * (b + c_1) = a * b + a * c_1
  • right_distrib : ∀ (a b c_1 : K), (a + b) * c_1 = a * c_1 + b * c_1
  • inv : K → K
  • div : K → K → K
  • div_eq_mul_inv : (∀ (a b : K), a / b = a * b⁻¹) . "try_refl_tac"
  • exists_pair_ne : ∃ (x y : K), x y
  • mul_inv_cancel : ∀ {a : K}, a 0a * a⁻¹ = 1
  • inv_zero : 0⁻¹ = 0

A division_ring is a ring with multiplicative inverses for nonzero elements

Instances
@[instance]
def division_ring.to_ring (K : Type u) [s : division_ring K] :

@[instance]

Every division ring is a group_with_zero.

Equations
theorem one_div_neg_one_eq_neg_one {K : Type u} [division_ring K] :
1 / -1 = -1

theorem one_div_neg_eq_neg_one_div {K : Type u} [division_ring K] (a : K) :
1 / -a = -(1 / a)

theorem div_neg_eq_neg_div {K : Type u} [division_ring K] (a b : K) :
b / -a = -(b / a)

theorem neg_div {K : Type u} [division_ring K] (a b : K) :
-b / a = -(b / a)

theorem neg_div' {K : Type u_1} [division_ring K] (a b : K) :
-(b / a) = -b / a

theorem neg_div_neg_eq {K : Type u} [division_ring K] (a b : K) :
-a / -b = a / b

theorem div_add_div_same {K : Type u} [division_ring K] (a b c : K) :
a / c + b / c = (a + b) / c

theorem same_add_div {K : Type u} [division_ring K] {a b : K} (h : b 0) :
(b + a) / b = 1 + a / b

theorem one_add_div {K : Type u} [division_ring K] {a b : K} (h : b 0) :
1 + a / b = (b + a) / b

theorem div_add_same {K : Type u} [division_ring K] {a b : K} (h : b 0) :
(a + b) / b = a / b + 1

theorem div_add_one {K : Type u} [division_ring K] {a b : K} (h : b 0) :
a / b + 1 = (a + b) / b

theorem div_sub_div_same {K : Type u} [division_ring K] (a b c : K) :
a / c - b / c = (a - b) / c

theorem same_sub_div {K : Type u} [division_ring K] {a b : K} (h : b 0) :
(b - a) / b = 1 - a / b

theorem one_sub_div {K : Type u} [division_ring K] {a b : K} (h : b 0) :
1 - a / b = (b - a) / b

theorem div_sub_same {K : Type u} [division_ring K] {a b : K} (h : b 0) :
(a - b) / b = a / b - 1

theorem div_sub_one {K : Type u} [division_ring K] {a b : K} (h : b 0) :
a / b - 1 = (a - b) / b

theorem neg_inv {K : Type u} [division_ring K] {a : K} :

theorem add_div {K : Type u} [division_ring K] (a b c : K) :
(a + b) / c = a / c + b / c

theorem sub_div {K : Type u} [division_ring K] (a b c : K) :
(a - b) / c = a / c - b / c

theorem div_neg {K : Type u} [division_ring K] {b : K} (a : K) :
a / -b = -(a / b)

theorem inv_neg {K : Type u} [division_ring K] {a : K} :

theorem one_div_mul_add_mul_one_div_eq_one_div_add_one_div {K : Type u} [division_ring K] {a b : K} (ha : a 0) (hb : b 0) :
((1 / a) * (a + b)) * (1 / b) = 1 / a + 1 / b

theorem one_div_mul_sub_mul_one_div_eq_one_div_add_one_div {K : Type u} [division_ring K] {a b : K} (ha : a 0) (hb : b 0) :
((1 / a) * (b - a)) * (1 / b) = 1 / a - 1 / b

theorem add_div_eq_mul_add_div {K : Type u} [division_ring K] (a b : K) {c : K} (hc : c 0) :
a + b / c = (a * c + b) / c

@[instance]
def field.to_has_inv (K : Type u) [s : field K] :

@[instance]
def field.to_comm_ring (K : Type u) [s : field K] :

@[instance]
def field.to_nontrivial (K : Type u) [s : field K] :

@[class]
structure field (K : Type u) :
Type u
  • add : K → K → K
  • add_assoc : ∀ (a b c_1 : K), a + b + c_1 = a + (b + c_1)
  • zero : K
  • zero_add : ∀ (a : K), 0 + a = a
  • add_zero : ∀ (a : K), a + 0 = a
  • neg : K → K
  • sub : K → K → K
  • sub_eq_add_neg : (∀ (a b : K), a - b = a + -b) . "try_refl_tac"
  • add_left_neg : ∀ (a : K), -a + a = 0
  • add_comm : ∀ (a b : K), a + b = b + a
  • mul : K → K → K
  • mul_assoc : ∀ (a b c_1 : K), (a * b) * c_1 = a * b * c_1
  • one : K
  • one_mul : ∀ (a : K), 1 * a = a
  • mul_one : ∀ (a : K), a * 1 = a
  • left_distrib : ∀ (a b c_1 : K), a * (b + c_1) = a * b + a * c_1
  • right_distrib : ∀ (a b c_1 : K), (a + b) * c_1 = a * c_1 + b * c_1
  • mul_comm : ∀ (a b : K), a * b = b * a
  • inv : K → K
  • exists_pair_ne : ∃ (x y : K), x y
  • mul_inv_cancel : ∀ {a : K}, a 0a * a⁻¹ = 1
  • inv_zero : 0⁻¹ = 0

A field is a comm_ring with multiplicative inverses for nonzero elements

Instances
@[instance]
def field.to_division_ring {K : Type u} [field K] :

Equations
theorem one_div_add_one_div {K : Type u} [field K] {a b : K} (ha : a 0) (hb : b 0) :
1 / a + 1 / b = (a + b) / a * b

theorem div_add_div {K : Type u} [field K] (a : K) {b : K} (c : K) {d : K} (hb : b 0) (hd : d 0) :
a / b + c / d = (a * d + b * c) / b * d

theorem div_sub_div {K : Type u} [field K] (a : K) {b : K} (c : K) {d : K} (hb : b 0) (hd : d 0) :
a / b - c / d = (a * d - b * c) / b * d

theorem inv_add_inv {K : Type u} [field K] {a b : K} (ha : a 0) (hb : b 0) :
a⁻¹ + b⁻¹ = (a + b) / a * b

theorem inv_sub_inv {K : Type u} [field K] {a b : K} (ha : a 0) (hb : b 0) :
a⁻¹ - b⁻¹ = (b - a) / a * b

theorem add_div' {K : Type u} [field K] (a b c : K) (hc : c 0) :
b + a / c = (b * c + a) / c

theorem sub_div' {K : Type u} [field K] (a b c : K) (hc : c 0) :
b - a / c = (b * c - a) / c

theorem div_add' {K : Type u} [field K] (a b c : K) (hc : c 0) :
a / c + b = (a + b * c) / c

theorem div_sub' {K : Type u} [field K] (a b c : K) (hc : c 0) :
a / c - b = (a - c * b) / c

@[instance]
def field.to_integral_domain {K : Type u} [field K] :

Equations
structure is_field (R : Type u) [ring R] :
Prop
  • exists_pair_ne : ∃ (x y : R), x y
  • mul_comm : ∀ (x y : R), x * y = y * x
  • mul_inv_cancel : ∀ {a : R}, a 0(∃ (b : R), a * b = 1)

A predicate to express that a ring is a field.

This is mainly useful because such a predicate does not contain data, and can therefore be easily transported along ring isomorphisms. Additionaly, this is useful when trying to prove that a particular ring structure extends to a field.

theorem field.to_is_field (R : Type u) [field R] :

Transferring from field to is_field

def is_field.to_field (R : Type u) [ring R] (h : is_field R) :

Transferring from is_field to field

Equations
theorem uniq_inv_of_is_field (R : Type u) [ring R] (hf : is_field R) (x : R) :
x 0(∃! (y : R), x * y = 1)

For each field, and for each nonzero element of said field, there is a unique inverse. Since is_field doesn't remember the data of an inv function and as such, a lemma that there is a unique inverse could be useful.

@[simp]
theorem ring_hom.map_units_inv {K : Type u} {R : Type u_1} [semiring R] [division_ring K] (f : R →+* K) (u : units R) :

theorem ring_hom.map_ne_zero {K : Type u} {R : Type u_1} [division_ring K] [semiring R] [nontrivial R] (f : K →+* R) {x : K} :
f x 0 x 0

@[simp]
theorem ring_hom.map_eq_zero {K : Type u} {R : Type u_1} [division_ring K] [semiring R] [nontrivial R] (f : K →+* R) {x : K} :
f x = 0 x = 0

theorem ring_hom.map_inv {K : Type u} {K' : Type u_2} [division_ring K] [division_ring K'] (g : K →+* K') (x : K) :

theorem ring_hom.map_div {K : Type u} {K' : Type u_2} [division_ring K] [division_ring K'] (g : K →+* K') (x y : K) :
g (x / y) = g x / g y

theorem ring_hom.injective {K : Type u} {R : Type u_1} [division_ring K] [semiring R] [nontrivial R] (f : K →+* R) :