Built with Alectryon, running Coq+SerAPI v8.19.0+0.19.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Spaces.Nat.Core. (* Some of the material in abstract_algebra and canonical names could be selectively exported to the user, as is done in Groups/Group.v. *) Require Import Classes.interfaces.canonical_names. Require Import Algebra.Groups.QuotientGroup. Require Import Algebra.AbGroups.AbelianGroup Algebra.AbGroups.Biproduct. Require Import Rings.Ring. Declare Scope module_scope. Local Open Scope module_scope. (** * Modules over a ring. *) (** ** Left Modules *) (** An abelian group [M] is a left [R]-module when equipped with the following data: *) Class IsLeftModule (R : Ring) (M : AbGroup) := { (** A function [lact] (left-action) that takes an element [r : R] and an element [m : M] and returns an element [lact r m : M], which we also denote [r *L m]. *) lact : R -> M -> M; (** Actions distribute on the left over addition in the abelian group. That is [r *L (m + n) = r *L m + r *L n]. *) lact_left_dist :: LeftHeteroDistribute lact (+) (+); (** Actions distribute on the right over addition in the ring. That is [(r + s) *L m = r *L m + s *L m]. *) lact_right_dist :: RightHeteroDistribute lact (+) (+); (** Actions are associative. That is [(r * s) *L m = r *L (s *L m)]. *) lact_assoc :: HeteroAssociative lact lact lact (.*.); (** Actions preserve the multiplicative identity. That is [1 *L m = m]. *) lact_unit :: LeftIdentity lact 1; }. Infix "*L" := lact : module_scope. (** A left R-module is an abelian group equipped with a left R-module structure. *) Record LeftModule (R : Ring) := { lm_carrier :> AbGroup; lm_lact :: IsLeftModule R lm_carrier; }. Section LeftModuleAxioms. Context {R : Ring} {M : LeftModule R} (r s : R) (m n : M). (** Here we state the module axioms in a readable form for direct use. *) Definition lm_dist_l : r *L (m + n) = r *L m + r *L n := lact_left_dist r m n. Definition lm_dist_r : (r + s) *L m = r *L m + s *L m := lact_right_dist r s m. Definition lm_assoc : r *L (s *L m) = (r * s) *L m := lact_assoc r s m. Definition lm_unit : 1 *L m = m := lact_unit m. End LeftModuleAxioms. (** ** Facts about left modules *) Section LeftModuleFacts. Context {R : Ring} {M : LeftModule R} (r : R) (m : M). (** Here are some quick facts that hold in modules. *) (** The left action of zero is zero. *)
R: Ring
M: LeftModule R
r: R
m: M

0 *L m = 0
R: Ring
M: LeftModule R
r: R
m: M

0 *L m = 0
R: Ring
M: LeftModule R
r: R
m: M

sg_op (0 *L m) (0 *L m) = 0 *L m
R: Ring
M: LeftModule R
r: R
m: M

(0 + 0) *L m = 0 *L m
R: Ring
M: LeftModule R
r: R
m: M

0 + 0 = 0
apply rng_plus_zero_r. Defined. (** The left action on zero is zero. *)
R: Ring
M: LeftModule R
r: R
m: M

r *L (0 : M) = 0
R: Ring
M: LeftModule R
r: R
m: M

r *L (0 : M) = 0
R: Ring
M: LeftModule R
r: R
m: M

sg_op (r *L 0) (r *L 0) = r *L 0
R: Ring
M: LeftModule R
r: R
m: M

r *L (0 + 0) = r *L 0
R: Ring
M: LeftModule R
r: R
m: M

0 + 0 = 0
apply grp_unit_l. Defined. (** The left action of [-1] is the additive inverse. *)
R: Ring
M: LeftModule R
r: R
m: M

-1 *L m = - m
R: Ring
M: LeftModule R
r: R
m: M

-1 *L m = - m
R: Ring
M: LeftModule R
r: R
m: M

sg_op (-1 *L m) m = mon_unit
R: Ring
M: LeftModule R
r: R
m: M

-1 *L m + 1 *L m = mon_unit
R: Ring
M: LeftModule R
r: R
m: M

(-1 + 1) *L m = mon_unit
R: Ring
M: LeftModule R
r: R
m: M

(-1 + 1) *L m = 0 *L m
R: Ring
M: LeftModule R
r: R
m: M

-1 + 1 = 0
apply grp_inv_l. Defined. (** The left action of [r] on the additive inverse of [m] is the additive inverse of the left action of [r] on [m]. *)
R: Ring
M: LeftModule R
r: R
m: M

r *L - m = - (r *L m)
R: Ring
M: LeftModule R
r: R
m: M

r *L - m = - (r *L m)
R: Ring
M: LeftModule R
r: R
m: M

sg_op (r *L - m) (r *L m) = mon_unit
R: Ring
M: LeftModule R
r: R
m: M

r *L (- m + m) = mon_unit
R: Ring
M: LeftModule R
r: R
m: M

r *L (- m + m) = r *L 0
R: Ring
M: LeftModule R
r: R
m: M

- m + m = 0
apply grp_inv_l. Defined. End LeftModuleFacts. (** Every ring [R] is a left [R]-module over itself. *)
R: Ring

IsLeftModule R R
R: Ring

IsLeftModule R R
rapply Build_IsLeftModule. Defined. (** ** Right Modules *) (** An abelian group [M] is a right [R]-module when it is a left [R^op]-module. *) Class IsRightModule (R : Ring) (M : AbGroup) := isleftmodule_op_isrightmodule :: IsLeftModule (rng_op R) M. (** [ract] (right-action) that takes an element [m : M] and an element [r : R] and returns an element [ract m r : M] which we also denote [m *R r]. *) Definition ract {R : Ring} {M : AbGroup} `{!IsRightModule R M} : M -> R -> M := fun m r => lact (R:=rng_op R) r m. Infix "*R" := ract. (** A right module is a left module over the opposite ring. *) Definition RightModule (R : Ring) := LeftModule (rng_op R). (** Right modules are right modules. *) Instance rm_ract {R : Ring} {M : RightModule R} : IsRightModule R M := lm_lact (rng_op R) M. Section RightModuleAxioms. Context {R : Ring} {M : RightModule R} (m n : M) (r s : R). (** Here we state the module axioms in a readable form for direct use. *) Definition rm_dist_r : (m + n) *R r = m *R r + n *R r := lm_dist_l (R:=rng_op R) r m n. Definition rm_dist_l : m *R (r + s) = m *R r + m *R s := lm_dist_r (R:=rng_op R) r s m. Definition rm_assoc : (m *R r) *R s = m *R (r * s) := lm_assoc (R:=rng_op R) s r m. Definition rm_unit : m *R 1 = m := lm_unit (R:=rng_op R) m. End RightModuleAxioms. (** ** Facts about right modules *) Section RightModuleFacts. Context {R : Ring} {M : RightModule R} (m : M) (r : R). (** The right action on zero is zero. *) Definition rm_zero_l : (0 : M) *R r = 0 := lm_zero_r (R:=rng_op R) r. (** The right action of zero is zero. *) Definition rm_zero_r : m *R 0 = 0 := lm_zero_l (R:=rng_op R) m. (** The right action of [-1] is the additive inverse. *) Definition rm_minus_one : m *R -1 = -m := lm_minus_one (R:=rng_op R) m. (** The right action of [r] on the additive inverse of [m] is the additive inverse of the right action of [r] on [m]. *) Definition rm_neg : -m *R r = - (m *R r) := lm_neg (R:=rng_op R) r m. End RightModuleFacts. (** Every ring [R] is a right [R]-module over itself. *) Instance isrightmodule_ring (R : Ring) : IsRightModule R R := isleftmodule_ring (rng_op R). (** ** Submodules *) (** A subgroup of a left R-module is a left submodule if it is closed under the action of R. *) Class IsLeftSubmodule {R : Ring} {M : LeftModule R} (N : M -> Type) := { ils_issubgroup :: IsSubgroup N; is_left_submodule : forall r m, N m -> N (r *L m); }. (** A subgroup of a right R-module is a right submodule if it is a left submodule over the opposite ring. *) Class IsRightSubmodule {R : Ring} {M : RightModule R} (N : M -> Type) := isleftsubmodule_op_isrightsubmodule :: IsLeftSubmodule (R:=rng_op R) N. (** A left submodule is a subgroup of the abelian group closed under the left action of R. *) Record LeftSubmodule {R : Ring} (M : LeftModule R) := { lsm_carrier :> M -> Type; lsm_submodule :: IsLeftSubmodule lsm_carrier; }. (** A right submodule is a subgroup of the abelian group closed under the right action of R. *) Definition RightSubmodule {R : Ring} (M : RightModule R) := LeftSubmodule (R:=rng_op R) M. Definition subgroup_leftsubmodule {R : Ring} {M : LeftModule R} : LeftSubmodule M -> Subgroup M := fun N => Build_Subgroup M N _. Coercion subgroup_leftsubmodule : LeftSubmodule >-> Subgroup. Definition subgroup_rightsubmodule {R : Ring} {M : RightModule R} : RightSubmodule M -> Subgroup M := idmap. Coercion subgroup_rightsubmodule : RightSubmodule >-> Subgroup. (** Left submodules inherit the left R-module structure of their parent. *)
R: Ring
M: LeftModule R
N: LeftSubmodule M

IsLeftModule R N
R: Ring
M: LeftModule R
N: LeftSubmodule M

IsLeftModule R N
R: Ring
M: LeftModule R
N: LeftSubmodule M

R -> N -> N
R: Ring
M: LeftModule R
N: LeftSubmodule M
LeftHeteroDistribute ?lact plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
RightHeteroDistribute ?lact plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
HeteroAssociative ?lact ?lact ?lact mult
R: Ring
M: LeftModule R
N: LeftSubmodule M
LeftIdentity ?lact 1
R: Ring
M: LeftModule R
N: LeftSubmodule M

R -> N -> N
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
n_in_N: N n

N
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
n_in_N: N n

N (r *L n)
by apply lsm_submodule.
R: Ring
M: LeftModule R
N: LeftSubmodule M

LeftHeteroDistribute (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
proj2: N n
m: M
proj0: N m

(r *L ((n; proj2) + (m; proj0)).1; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N r ((n; proj2) + (m; proj0)).1 ((n; proj2) + (m; proj0)).2).1 = ((r *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N r n proj2) + (r *L m; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N r m proj0)).1
apply lact_left_dist.
R: Ring
M: LeftModule R
N: LeftSubmodule M

RightHeteroDistribute (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
n: M
proj2: N n

((r + s) *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N (r + s) n proj2).1 = ((r *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N r n proj2) + (s *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N s n proj2)).1
apply lact_right_dist.
R: Ring
M: LeftModule R
N: LeftSubmodule M

HeteroAssociative (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) mult
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
n: M
proj2: N n

(r *L (s *L n); let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N r (s *L n) (let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N s n proj2)).1 = ((r * s) *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N (r * s) n proj2).1
apply lact_assoc.
R: Ring
M: LeftModule R
N: LeftSubmodule M

LeftIdentity (fun (r : R) (X : N) => (fun (n : M) (n_in_N : N n) => (r *L n; let X0 := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X0 M N r n n_in_N)) X.1 X.2) 1
R: Ring
M: LeftModule R
N: LeftSubmodule M
n: M
proj2: N n

(1 *L n; let X := fun (M : LeftModule R) (l : LeftSubmodule M) => is_left_submodule in X M N 1 n proj2).1 = (n; proj2).1
apply lact_unit. Defined. (** Right submodules inherit the right R-module structure of their parent. *) Instance isrightmodule_rightsubmodule {R : Ring} {M : RightModule R} (N : RightSubmodule M) : IsRightModule R N := isleftmodule_leftsubmodule (R:=rng_op R) N. (** Any left submodule of a left R-module is a left R-module. *) Definition leftmodule_leftsubmodule {R : Ring} {M : LeftModule R} (N : LeftSubmodule M) : LeftModule R := Build_LeftModule R N _. Coercion leftmodule_leftsubmodule : LeftSubmodule >-> LeftModule. (** Any right submodule of a right R-module is a right R-module. *) Definition rightmodule_rightsubmodule {R : Ring} {M : RightModule R} (N : RightSubmodule M) : RightModule R := N. Coercion rightmodule_rightsubmodule : RightSubmodule >-> RightModule. (** The submodule criterion. This is a convenient way to build submodules. *)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

IsLeftSubmodule H
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

IsLeftSubmodule H
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

IsSubgroup H
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
forall (r : R) (m : M), H m -> H (r *L m)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

IsSubgroup H
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

forall x : M, IsHProp (H x)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
H mon_unit
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
forall x y : M, H x -> H y -> H (sg_op x (inv y))
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

forall x : M, IsHProp (H x)
exact _.
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

H mon_unit
exact z.
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

forall x y : M, H x -> H y -> H (sg_op x (inv y))
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
x, y: M
hx: H x
hy: H y

H (sg_op x (inv y))
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
x, y: M
hx: H x
hy: H y

H (x + inv y)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
x, y: M
hx: H x
hy: H y
p: H (x + -1 *L y)

H (x + inv y)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
x, y: M
hx: H x
hy: H y
p: H (x - y)

H (x + inv y)
exact p.
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

forall (r : R) (m : M), H m -> H (r *L m)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
r: R
m: M
hm: H m

H (r *L m)
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
r: R
m: M
hm: H m

H (sg_op mon_unit (r *L m))
by apply c. Defined. Definition Build_IsRightSubmodule' {R : Ring} {M : RightModule R} (H : M -> Type) `{forall x, IsHProp (H x)} (z : H zero) (c : forall r n m, H n -> H m -> H (n + ract m r)) : IsRightSubmodule H := Build_IsLeftSubmodule' (R:=rng_op R) H z c.
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

LeftSubmodule M
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)

LeftSubmodule M
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H

LeftSubmodule M
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H

M -> Type
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H
IsLeftSubmodule ?lsm_carrier
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H

IsSubgroup H
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H
IsLeftSubmodule {| subgroup_pred := H; subgroup_issubgroup := ?subgroup_issubgroup |}
R: Ring
M: LeftModule R
H: M -> Type
H0: forall x : M, IsHProp (H x)
z: H 0
c: forall (r : R) (n m : M), H n -> H m -> H (n + r *L m)
p:= Build_IsLeftSubmodule' H z c: IsLeftSubmodule H

IsSubgroup H
rapply ils_issubgroup. Defined. Definition Build_RightSubmodule {R : Ring} {M : RightModule R} (H : M -> Type) `{forall x, IsHProp (H x)} (z : H zero) (c : forall r n m, H n -> H m -> H (n + m *R r)) : RightSubmodule M := Build_LeftSubmodule' (R:=rng_op R) H z c. (** ** R-module homomorphisms *) (** A left module homomorphism is a group homomorphism that commutes with the left action of R. *) Record LeftModuleHomomorphism {R : Ring} (M N : LeftModule R) := { lm_homo_map :> GroupHomomorphism M N; lm_homo_lact : forall r m, lm_homo_map (r *L m) = r *L lm_homo_map m; }. Definition RightModuleHomomorphism {R : Ring} (M N : RightModule R) := LeftModuleHomomorphism (R:=rng_op R) M N. Definition rm_homo_map {R : Ring} {M N : RightModule R} : RightModuleHomomorphism M N -> GroupHomomorphism M N := lm_homo_map (R:=rng_op R) M N. Coercion rm_homo_map : RightModuleHomomorphism >-> GroupHomomorphism. Definition rm_homo_ract {R : Ring} {M N : RightModule R} (f : RightModuleHomomorphism M N) : forall m r, f (ract m r) = ract (f m) r := fun m r => lm_homo_lact (R:=rng_op R) M N f r m.
R: Ring
M: LeftModule R

LeftModuleHomomorphism M M
R: Ring
M: LeftModule R

LeftModuleHomomorphism M M
R: Ring
M: LeftModule R

GroupHomomorphism M M
R: Ring
M: LeftModule R
forall (r : R) (m : M), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M: LeftModule R

GroupHomomorphism M M
exact grp_homo_id.
R: Ring
M: LeftModule R

forall (r : R) (m : M), grp_homo_id (r *L m) = r *L grp_homo_id m
reflexivity. Defined. Definition rm_homo_id {R : Ring} (M : RightModule R) : RightModuleHomomorphism M M := lm_homo_id (R:=rng_op R) M.
R: Ring
M, N, L: LeftModule R

LeftModuleHomomorphism N L -> LeftModuleHomomorphism M N -> LeftModuleHomomorphism M L
R: Ring
M, N, L: LeftModule R

LeftModuleHomomorphism N L -> LeftModuleHomomorphism M N -> LeftModuleHomomorphism M L
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N

LeftModuleHomomorphism M L
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N

GroupHomomorphism M L
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N
forall (r : R) (m : M), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N

GroupHomomorphism M L
exact (grp_homo_compose f g).
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N

forall (r : R) (m : M), grp_homo_compose f g (r *L m) = r *L grp_homo_compose f g m
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N
r: R
m: M

grp_homo_compose f g (r *L m) = r *L grp_homo_compose f g m
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N
r: R
m: M

grp_homo_compose f g (r *L m) = f (r *L g m)
R: Ring
M, N, L: LeftModule R
f: LeftModuleHomomorphism N L
g: LeftModuleHomomorphism M N
r: R
m: M

g (r *L m) = r *L g m
apply lm_homo_lact. Defined. Definition rm_homo_compose {R : Ring} {M N L : RightModule R} : RightModuleHomomorphism N L -> RightModuleHomomorphism M N -> RightModuleHomomorphism M L := lm_homo_compose (R:=rng_op R). (** Smart constructor for building left module homomorphisms from a map. *)
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

LeftModuleHomomorphism M N
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

LeftModuleHomomorphism M N
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

GroupHomomorphism M N
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
forall (r : R) (m : M), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

GroupHomomorphism M N
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

M -> N
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
IsSemiGroupPreserving ?grp_homo_map
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

M -> N
exact f.
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

IsSemiGroupPreserving f
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
x, y: M

f (sg_op x y) = sg_op (f x) (f y)
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
x, y: M

f (sg_op x y) = sg_op (1 *L f x) (f y)
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
x, y: M
g:= 1 *L f x: N

f (sg_op x y) = sg_op g (f y)
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
x, y: M
g:= 1 *L f x: N

f (sg_op (1 *L x) y) = sg_op g (f y)
apply p.
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y

forall (r : R) (m : M), {| grp_homo_map := f; issemigrouppreserving_grp_homo := (fun x y : M => internal_paths_rew (fun g : N => f (sg_op x y) = sg_op g (f y)) (let g := 1 *L f x in internal_paths_rew (fun x0 : M => f (sg_op x0 y) = sg_op g (f y)) (p 1 x y) (lm_unit x)) (lm_unit (f x))) : IsSemiGroupPreserving f |} (r *L m) = r *L {| grp_homo_map := f; issemigrouppreserving_grp_homo := (fun x y : M => internal_paths_rew (fun g : N => f (sg_op x y) = sg_op g (f y)) (let g := 1 *L f x in internal_paths_rew (fun x0 : M => f (sg_op x0 y) = sg_op g (f y)) (p 1 x y) (lm_unit x)) (lm_unit (f x))) : IsSemiGroupPreserving f |} m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

{| grp_homo_map := f; issemigrouppreserving_grp_homo := (fun x y : M => internal_paths_rew (fun g : N => f (sg_op x y) = sg_op g (f y)) (let g := 1 *L f x in internal_paths_rew (fun x0 : M => f (sg_op x0 y) = sg_op g (f y)) (p 1 x y) (lm_unit x)) (lm_unit (f x))) : IsSemiGroupPreserving f |} (r *L m) = r *L {| grp_homo_map := f; issemigrouppreserving_grp_homo := (fun x y : M => internal_paths_rew (fun g : N => f (sg_op x y) = sg_op g (f y)) (let g := 1 *L f x in internal_paths_rew (fun x0 : M => f (sg_op x0 y) = sg_op g (f y)) (p 1 x y) (lm_unit x)) (lm_unit (f x))) : IsSemiGroupPreserving f |} m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

f (r *L m) = r *L f m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

f (sg_op (r *L m) mon_unit) = r *L f m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

r *L f m + f mon_unit = r *L f m
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

r *L f m + f mon_unit = sg_op (r *L f m) mon_unit
R: Ring
M, N: LeftModule R
f: M -> N
p: forall (r : R) (x y : M), f (r *L x + y) = r *L f x + f y
r: R
m: M

f mon_unit = mon_unit
R: Ring
M, N: LeftModule R
f: M -> N
p: f (1 *L 0 + 0) = 1 *L f 0 + f 0
r: R
m: M

f mon_unit = mon_unit
R: Ring
M, N: LeftModule R
f: M -> N
p: f (0 + 0) = f 0 + f 0
r: R
m: M

f mon_unit = mon_unit
R: Ring
M, N: LeftModule R
f: M -> N
p: f (0 + 0) = f 0 + f 0
r: R
m: M

sg_op (f 0) (f mon_unit) = f 0
R: Ring
M, N: LeftModule R
f: M -> N
p: f (0 + 0) = f 0 + f 0
r: R
m: M

f (0 + 0) = f 0
R: Ring
M, N: LeftModule R
f: M -> N
p: f (0 + 0) = f 0 + f 0
r: R
m: M

0 + 0 = 0
apply grp_unit_l. Defined. Definition Build_RightModuleHomomorphism' {R :Ring} {M N : RightModule R} (f : M -> N) (p : forall r x y, f (x *R r + y) = f x *R r + f y) : RightModuleHomomorphism M N := Build_LeftModuleHomomorphism' (R:=rng_op R) f p. Record LeftModuleIsomorphism {R : Ring} (M N : LeftModule R) := { lm_iso_map :> LeftModuleHomomorphism M N; isequiv_lm_iso_map :: IsEquiv lm_iso_map; }. Definition RightModuleIsomorphism {R : Ring} (M N : RightModule R) := LeftModuleIsomorphism (R:=rng_op R) M N.
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

LeftModuleIsomorphism M N
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

LeftModuleIsomorphism M N
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

LeftModuleHomomorphism M N
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x
IsEquiv ?lm_iso_map
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

LeftModuleHomomorphism M N
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

GroupHomomorphism M N
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x
forall (r : R) (m : M), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

GroupHomomorphism M N
exact f.
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

forall (r : R) (m : M), f (r *L m) = r *L f m
exact p.
R: Ring
M, N: LeftModule R
f: GroupIsomorphism M N
p: forall (r : R) (x : M), f (r *L x) = r *L f x

IsEquiv {| lm_homo_map := f; lm_homo_lact := p |}
exact _. Defined. Definition Build_RightModuleIsomorphism' {R : Ring} (M N : RightModule R) (f : GroupIsomorphism M N) (p : forall r x, f (ract x r) = ract (f x) r) : RightModuleIsomorphism M N := Build_LeftModuleIsomorphism' (R:=rng_op R) M N f p.
R: Ring
M, N: LeftModule R

LeftModuleIsomorphism M N -> LeftModuleIsomorphism N M
R: Ring
M, N: LeftModule R

LeftModuleIsomorphism M N -> LeftModuleIsomorphism N M
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

LeftModuleIsomorphism N M
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

LeftModuleHomomorphism N M
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
IsEquiv ?lm_iso_map
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

LeftModuleHomomorphism N M
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

N -> M
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
forall (r : R) (x y : N), ?f (r *L x + y) = r *L ?f x + ?f y
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

N -> M
exact f^-1.
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

forall (r : R) (x y : N), f^-1 (r *L x + y) = r *L f^-1 x + f^-1 y
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

f^-1 (r *L m + n) = r *L f^-1 m + f^-1 n
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

r *L m + n = f (r *L f^-1 m + f^-1 n)
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

r *L m + n = sg_op (f (r *L f^-1 m)) (f (f^-1 n))
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

sg_op (f (r *L f^-1 m)) (f (f^-1 n)) = r *L m + n
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

f (r *L f^-1 m) = r *L m
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N
f (f^-1 n) = n
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

f (r *L f^-1 m) = r *L m
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

r *L f (f^-1 m) = r *L m
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N
r: R
m, n: N

f (f^-1 m) = m
apply eisretr.
R: Ring
M, N: LeftModule R
f: LeftModuleIsomorphism M N

IsEquiv (Build_LeftModuleHomomorphism' f^-1 (fun (r : R) (m n : N) => moveR_equiv_V (r *L m + n) (r *L f^-1 m + f^-1 n) ((ap11 (ap11 1 (lm_homo_lact M N f r (f^-1 m) @ ap (lact r) (eisretr f m))) (eisretr f n))^ @ (grp_homo_op f (r *L f^-1 m) (f^-1 n))^)))
exact _. Defined. Definition rm_iso_inverse {R : Ring} {M N : RightModule R} : RightModuleIsomorphism M N -> RightModuleIsomorphism N M := lm_iso_inverse (R:=rng_op R). (** ** Category of left and right R-modules *) (** TODO: define as a displayed category over Ring *) (** *** Category of left R-modules *) Instance isgraph_leftmodule {R : Ring} : IsGraph (LeftModule R) := Build_IsGraph _ LeftModuleHomomorphism. Instance is01cat_leftmodule {R : Ring} : Is01Cat (LeftModule R) := Build_Is01Cat _ _ lm_homo_id (@lm_homo_compose R). Instance is2graph_leftmodule {R : Ring} : Is2Graph (LeftModule R) := fun M N => isgraph_induced (@lm_homo_map R M N).
R: Ring

Is1Cat (LeftModule R)
R: Ring

Is1Cat (LeftModule R)
R: Ring

forall a b : LeftModule R, Is01Cat (a $-> b)
R: Ring
forall a b : LeftModule R, Is0Gpd (a $-> b)
R: Ring
forall (a b c : LeftModule R) (g : b $-> c), Is0Functor (cat_postcomp a g)
R: Ring
forall (a b c : LeftModule R) (f : a $-> b), Is0Functor (cat_precomp c f)
R: Ring
forall (a b c d : LeftModule R) (f : a $-> b) (g : b $-> c) (h : c $-> d), h $o g $o f $== h $o (g $o f)
R: Ring
forall (a b : LeftModule R) (f : a $-> b), Id b $o f $== f
R: Ring
forall (a b : LeftModule R) (f : a $-> b), f $o Id a $== f
R: Ring

forall a b : LeftModule R, Is01Cat (a $-> b)
intros M N; rapply is01cat_induced.
R: Ring

forall a b : LeftModule R, Is0Gpd (a $-> b)
intros M N; rapply is0gpd_induced.
R: Ring

forall (a b c : LeftModule R) (g : b $-> c), Is0Functor (cat_postcomp a g)
R: Ring
M, N, L: LeftModule R
h: N $-> L

Is0Functor (cat_postcomp M h)
R: Ring
M, N, L: LeftModule R
h: N $-> L

forall a b : M $-> N, (a $-> b) -> cat_postcomp M h a $-> cat_postcomp M h b
R: Ring
M, N, L: LeftModule R
h: N $-> L
f, g: M $-> N
p: f $-> g
m: M

cat_postcomp M h f m = cat_postcomp M h g m
exact (ap h (p m)).
R: Ring

forall (a b c : LeftModule R) (f : a $-> b), Is0Functor (cat_precomp c f)
R: Ring
M, N, L: LeftModule R
f: M $-> N

Is0Functor (cat_precomp L f)
R: Ring
M, N, L: LeftModule R
f: M $-> N

forall a b : N $-> L, (a $-> b) -> cat_precomp L f a $-> cat_precomp L f b
R: Ring
M, N, L: LeftModule R
f: M $-> N
g, h: N $-> L
p: g $-> h
m: M

cat_precomp L f g m = cat_precomp L f h m
exact (p (f m)).
R: Ring

forall (a b c d : LeftModule R) (f : a $-> b) (g : b $-> c) (h : c $-> d), h $o g $o f $== h $o (g $o f)
simpl; reflexivity.
R: Ring

forall (a b : LeftModule R) (f : a $-> b), Id b $o f $== f
simpl; reflexivity.
R: Ring

forall (a b : LeftModule R) (f : a $-> b), f $o Id a $== f
simpl; reflexivity. Defined.
R: Ring

HasEquivs (LeftModule R)
R: Ring

HasEquivs (LeftModule R)
R: Ring

LeftModule R -> LeftModule R -> Type
R: Ring
forall a b : LeftModule R, (a $-> b) -> Type
R: Ring
forall a b : LeftModule R, ?CatEquiv' a b -> a $-> b
R: Ring
forall (a b : LeftModule R) (f : ?CatEquiv' a b), ?CatIsEquiv' a b (?cate_fun' a b f)
R: Ring
forall (a b : LeftModule R) (f : a $-> b), ?CatIsEquiv' a b f -> ?CatEquiv' a b
R: Ring
forall (a b : LeftModule R) (f : a $-> b) (fe : ?CatIsEquiv' a b f), ?cate_fun' a b (?cate_buildequiv' a b f fe) $== f
R: Ring
forall a b : LeftModule R, ?CatEquiv' a b -> b $-> a
R: Ring
forall (a b : LeftModule R) (f : ?CatEquiv' a b), ?cate_inv' a b f $o ?cate_fun' a b f $== Id a
R: Ring
forall (a b : LeftModule R) (f : ?CatEquiv' a b), ?cate_fun' a b f $o ?cate_inv' a b f $== Id b
R: Ring
forall (a b : LeftModule R) (f : a $-> b) (g : b $-> a), f $o g $== Id b -> g $o f $== Id a -> ?CatIsEquiv' a b f
R: Ring

LeftModule R -> LeftModule R -> Type
exact LeftModuleIsomorphism.
R: Ring

forall a b : LeftModule R, (a $-> b) -> Type
intros M N; exact IsEquiv.
R: Ring

forall a b : LeftModule R, LeftModuleIsomorphism a b -> a $-> b
intros M N f; exact f.
R: Ring

forall (a b : LeftModule R) (f : LeftModuleIsomorphism a b), (fun (M N : LeftModule R) (f0 : M $-> N) => IsEquiv f0) a b ((fun (M N : LeftModule R) (f0 : LeftModuleIsomorphism M N) => lm_iso_map M N f0) a b f)
simpl; exact _.
R: Ring

forall (a b : LeftModule R) (f : a $-> b), (fun (M N : LeftModule R) (f0 : M $-> N) => IsEquiv f0) a b f -> LeftModuleIsomorphism a b
apply Build_LeftModuleIsomorphism.
R: Ring

forall (a b : LeftModule R) (f : a $-> b) (fe : (fun (M N : LeftModule R) (f0 : M $-> N) => IsEquiv f0) a b f), (fun (M N : LeftModule R) (f0 : LeftModuleIsomorphism M N) => lm_iso_map M N f0) a b {| lm_iso_map := f; isequiv_lm_iso_map := fe |} $== f
reflexivity.
R: Ring

forall a b : LeftModule R, LeftModuleIsomorphism a b -> b $-> a
intros M N; exact lm_iso_inverse.
R: Ring

forall (a b : LeftModule R) (f : LeftModuleIsomorphism a b), (fun (M N : LeftModule R) (x : LeftModuleIsomorphism M N) => lm_iso_map N M (lm_iso_inverse x)) a b f $o (fun (M N : LeftModule R) (f0 : LeftModuleIsomorphism M N) => lm_iso_map M N f0) a b f $== Id a
intros M N f; apply eissect.
R: Ring

forall (a b : LeftModule R) (f : LeftModuleIsomorphism a b), (fun (M N : LeftModule R) (f0 : LeftModuleIsomorphism M N) => lm_iso_map M N f0) a b f $o (fun (M N : LeftModule R) (x : LeftModuleIsomorphism M N) => lm_iso_map N M (lm_iso_inverse x)) a b f $== Id b
intros M N f; apply eisretr.
R: Ring

forall (a b : LeftModule R) (f : a $-> b) (g : b $-> a), f $o g $== Id b -> g $o f $== Id a -> (fun (M N : LeftModule R) (f0 : M $-> N) => IsEquiv f0) a b f
R: Ring
M, N: LeftModule R
f: M $-> N
g: N $-> M
fg: f $o g $== Id N
gf: g $o f $== Id M

(fun (M N : LeftModule R) (f : M $-> N) => IsEquiv f) M N f
exact (isequiv_adjointify f g fg gf). Defined. (** *** Category of right R-modules *) Instance isgraph_rightmodule {R : Ring} : IsGraph (RightModule R) := isgraph_leftmodule (R:=rng_op R). Instance is01cat_rightmodule {R : Ring} : Is01Cat (RightModule R) := is01cat_leftmodule (R:=rng_op R). Instance is2graph_rightmodule {R : Ring} : Is2Graph (RightModule R) := is2graph_leftmodule (R:=rng_op R). Instance is1cat_rightmodule {R : Ring} : Is1Cat (RightModule R) := is1cat_leftmodule (R:=rng_op R). Instance hasequivs_rightmodule {R : Ring} : HasEquivs (RightModule R) := hasequivs_leftmodule (R:=rng_op R). (** ** Kernel of module homomorphism *)
R: Ring
M, N: LeftModule R
f: M $-> N

IsLeftSubmodule (grp_kernel f)
R: Ring
M, N: LeftModule R
f: M $-> N

IsLeftSubmodule (grp_kernel f)
R: Ring
M, N: LeftModule R
f: M $-> N

forall (r : R) (m : M), grp_kernel f m -> grp_kernel f (r *L m)
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M
n: grp_kernel f m

grp_kernel f (r *L m)
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M
n: grp_kernel f m

r *L f m = mon_unit
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M
n: grp_kernel f m

r *L f m = r *L 0
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M
n: grp_kernel f m

f m = 0
exact n. Defined. Instance isrightsubmodule_grp_kernel {R : Ring} {M N : RightModule R} (f : M $-> N) : IsRightSubmodule (grp_kernel f) := isleftsubmodule_grp_kernel (R:=rng_op R) f. Definition lm_kernel {R : Ring} {M N : LeftModule R} (f : M $-> N) : LeftSubmodule M := Build_LeftSubmodule _ _ (grp_kernel f) _. Definition rm_kernel {R : Ring} {M N : RightModule R} (f : M $-> N) : RightSubmodule M := lm_kernel (R:=rng_op R) f. (** ** Image of module homomorphism *)
R: Ring
M, N: LeftModule R
f: M $-> N

IsLeftSubmodule (grp_image f)
R: Ring
M, N: LeftModule R
f: M $-> N

IsLeftSubmodule (grp_image f)
R: Ring
M, N: LeftModule R
f: M $-> N

forall (r : R) (m : N), grp_image f m -> grp_image f (r *L m)
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: N
n: M
p: f n = m

{x : M & f x = r *L m}
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: N
n: M
p: f n = m

f (r *L n) = r *L m
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: N
n: M
p: f n = m

r *L f n = r *L m
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: N
n: M
p: f n = m

f n = m
exact p. Defined. Instance isrightsubmodule_grp_image {R : Ring} {M N : RightModule R} (f : M $-> N) : IsRightSubmodule (grp_image f) := isleftsubmodule_grp_image (R:=rng_op R) f. Definition lm_image {R : Ring} {M N : LeftModule R} (f : M $-> N) : LeftSubmodule N := Build_LeftSubmodule _ _ (grp_image f) _. Definition rm_image {R : Ring} {M N : RightModule R} (f : M $-> N) : RightSubmodule N := lm_image (R:=rng_op R) f. (** ** Quotient Modules *) (** The quotient abelian group of a module and a submodule has a natural ring action. *)
R: Ring
M: LeftModule R
N: LeftSubmodule M

IsLeftModule R (QuotientAbGroup M N)
R: Ring
M: LeftModule R
N: LeftSubmodule M

IsLeftModule R (QuotientAbGroup M N)
R: Ring
M: LeftModule R
N: LeftSubmodule M

R -> QuotientAbGroup M N -> QuotientAbGroup M N
R: Ring
M: LeftModule R
N: LeftSubmodule M
LeftHeteroDistribute ?lact plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
RightHeteroDistribute ?lact plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
HeteroAssociative ?lact ?lact ?lact mult
R: Ring
M: LeftModule R
N: LeftSubmodule M
LeftIdentity ?lact 1
R: Ring
M: LeftModule R
N: LeftSubmodule M

R -> QuotientAbGroup M N -> QuotientAbGroup M N
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

QuotientAbGroup M N -> QuotientAbGroup M N
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

GroupHomomorphism M (QuotientAbGroup M N)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
forall n : M, N n -> ?f n = mon_unit
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

GroupHomomorphism M (QuotientAbGroup M N)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

M $-> M
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

M -> M
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
IsSemiGroupPreserving ?grp_homo_map
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

M -> M
exact (lact r).
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

IsSemiGroupPreserving (lact r)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
x, y: M

r *L sg_op x y = sg_op (r *L x) (r *L y)
apply lm_dist_l.
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R

forall n : M, N n -> (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
Nn: N n

class_of (fun x y : M => N (sg_op (inv x) y)) (r *L n) = mon_unit
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
Nn: N n

in_cosetL N (r *L n) mon_unit
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
Nn: N n

N (r *L n)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
Nn: N n
N mon_unit
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: M
Nn: N n

N (r *L n)
by apply is_left_submodule.
R: Ring
M: LeftModule R
N: LeftSubmodule M

LeftHeteroDistribute (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
n: QuotientAbGroup M N

forall m : QuotientAbGroup M N, quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l r x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit)) (m + n) = quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l r x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit)) m + quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l r x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit)) n
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
m: M

forall n : QuotientAbGroup M N, (fun x : M / in_cosetL {| normalsubgroup_subgroup := N; normalsubgroup_isnormal := isnormal_ab_subgroup M N |} => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x0 y : M => lm_dist_l r x0 y |}) (fun (n0 : M) (Nn : N n0) => qglue (issubgroup_in_inv_op (r *L n0) mon_unit (is_left_submodule r n0 Nn) issubgroup_in_unit)) (x + n) = quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x0 y : M => lm_dist_l r x0 y |}) (fun (n0 : M) (Nn : N n0) => qglue (issubgroup_in_inv_op (r *L n0) mon_unit (is_left_submodule r n0 Nn) issubgroup_in_unit)) x + quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x0 y : M => lm_dist_l r x0 y |}) (fun (n0 : M) (Nn : N n0) => qglue (issubgroup_in_inv_op (r *L n0) mon_unit (is_left_submodule r n0 Nn) issubgroup_in_unit)) n) (class_of (in_cosetL {| normalsubgroup_subgroup := N; normalsubgroup_isnormal := isnormal_ab_subgroup M N |}) m)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
m, n: M

class_of (fun x y : M => N (sg_op (inv x) y)) (r *L sg_op m n) = class_of (fun x y : M => N (sg_op (inv x) y)) (r *L m) + class_of (fun x y : M => N (sg_op (inv x) y)) (r *L n)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r: R
m, n: M

r *L sg_op m n = sg_op (r *L m) (r *L n)
apply lm_dist_l.
R: Ring
M: LeftModule R
N: LeftSubmodule M

RightHeteroDistribute (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) plus plus
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R

forall c : QuotientAbGroup M N, quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact (r + s); issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l (r + s) x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op ((r + s) *L n) mon_unit (is_left_submodule (r + s) n Nn) issubgroup_in_unit)) c = quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l r x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit)) c + quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact s; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l s x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (s *L n) mon_unit (is_left_submodule s n Nn) issubgroup_in_unit)) c
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
m: M

class_of (fun x y : M => N (sg_op (inv x) y)) ((r + s) *L m) = class_of (fun x y : M => N (sg_op (inv x) y)) (r *L m) + class_of (fun x y : M => N (sg_op (inv x) y)) (s *L m)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
m: M

(r + s) *L m = sg_op (r *L m) (s *L m)
apply lm_dist_r.
R: Ring
M: LeftModule R
N: LeftSubmodule M

HeteroAssociative (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) mult
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R

forall z : QuotientAbGroup M N, quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l r x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit)) (quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact s; issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l s x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (s *L n) mon_unit (is_left_submodule s n Nn) issubgroup_in_unit)) z) = quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact (r * s); issemigrouppreserving_grp_homo := fun x y : M => lm_dist_l (r * s) x y |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op ((r * s) *L n) mon_unit (is_left_submodule (r * s) n Nn) issubgroup_in_unit)) z
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
m: M

class_of (fun x y : M => N (sg_op (inv x) y)) (r *L (s *L m)) = class_of (fun x y : M => N (sg_op (inv x) y)) ((r * s) *L m)
R: Ring
M: LeftModule R
N: LeftSubmodule M
r, s: R
m: M

r *L (s *L m) = (r * s) *L m
apply lm_assoc.
R: Ring
M: LeftModule R
N: LeftSubmodule M

LeftIdentity (fun r : R => quotient_abgroup_rec N (QuotientAbGroup M N) (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) (fun (n : M) (Nn : N n) => qglue (issubgroup_in_inv_op (r *L n) mon_unit (is_left_submodule r n Nn) issubgroup_in_unit) : (grp_quotient_map $o {| grp_homo_map := lact r; issemigrouppreserving_grp_homo := (fun x y : M => lm_dist_l r x y) : IsSemiGroupPreserving (lact r) |}) n = mon_unit)) 1
R: Ring
M: LeftModule R
N: LeftSubmodule M
m: M

class_of (fun x y : M => N (sg_op (inv x) y)) (1 *L m) = class_of (fun x y : M => N (sg_op (inv x) y)) m
R: Ring
M: LeftModule R
N: LeftSubmodule M
m: M

1 *L m = m
apply lm_unit. Defined. Instance isrightmodule_quotientabgroup {R : Ring} (M : RightModule R) (N : RightSubmodule M) : IsRightModule R (QuotientAbGroup M N) := isleftmodule_quotientabgroup (R:=rng_op R) M N. (** We can therefore form the quotient module of a module by its submodule. *) Definition QuotientLeftModule {R : Ring} (M : LeftModule R) (N : LeftSubmodule M) : LeftModule R := Build_LeftModule R (QuotientAbGroup M N) _. Definition QuotientRightModule {R : Ring} (M : RightModule R) (N : RightSubmodule M) : RightModule R := QuotientLeftModule (R:=rng_op R) M N. Infix "/" := QuotientLeftModule : module_scope. (** TODO: Notation for right module quotient? *) (** ** First Isomorphism Theorem *) Local Open Scope module_scope. Local Open Scope wc_iso_scope.
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N

M / lm_kernel f ≅ lm_image f
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N

M / lm_kernel f ≅ lm_image f
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N

GroupIsomorphism (M / lm_kernel f) (lm_image f)
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N
forall (r : R) (x : M / lm_kernel f), ?f (r *L x) = r *L ?f x
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N

forall (r : R) (x : M / lm_kernel f), abgroup_first_iso f (r *L x) = r *L abgroup_first_iso f x
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N
r: R

forall x : M / lm_kernel f, abgroup_first_iso f (r *L x) = r *L abgroup_first_iso f x
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M

(fun x : Quotient (in_cosetL {| normalsubgroup_subgroup := lm_kernel f; normalsubgroup_isnormal := isnormal_ab_subgroup M (lm_kernel f) |}) => abgroup_first_iso f (r *L x) = r *L abgroup_first_iso f x) (class_of (in_cosetL {| normalsubgroup_subgroup := lm_kernel f; normalsubgroup_isnormal := isnormal_ab_subgroup M (lm_kernel f) |}) m)
H: Funext
R: Ring
M, N: LeftModule R
f: M $-> N
r: R
m: M

f (r *L m) = r *L f m
apply lm_homo_lact. Defined. Definition rm_first_iso `{Funext} {R : Ring} {M N : RightModule R} (f : M $-> N) : QuotientRightModule M (rm_kernel f) ≅ rm_image f := lm_first_iso (R:=rng_op R) f. (** ** Direct products *) (** TODO: generalise to biproducts *) (** The direct product of modules *)
R: Ring

LeftModule R -> LeftModule R -> LeftModule R
R: Ring

LeftModule R -> LeftModule R -> LeftModule R
R: Ring
M, N: LeftModule R

LeftModule R
R: Ring
M, N: LeftModule R

IsLeftModule R (ab_biprod M N)
R: Ring
M, N: LeftModule R

R -> ab_biprod M N -> ab_biprod M N
R: Ring
M, N: LeftModule R
LeftHeteroDistribute ?lact plus plus
R: Ring
M, N: LeftModule R
RightHeteroDistribute ?lact plus plus
R: Ring
M, N: LeftModule R
HeteroAssociative ?lact ?lact ?lact mult
R: Ring
M, N: LeftModule R
LeftIdentity ?lact 1
R: Ring
M, N: LeftModule R

R -> ab_biprod M N -> ab_biprod M N
R: Ring
M, N: LeftModule R
r: R

ab_biprod M N -> ab_biprod M N
apply functor_prod; exact (lact r).
R: Ring
M, N: LeftModule R

LeftHeteroDistribute (fun r : R => functor_prod (lact r) (lact r)) plus plus
R: Ring
M, N: LeftModule R
r: R
m, n: ab_biprod M N

functor_prod (lact r) (lact r) (m + n) = functor_prod (lact r) (lact r) m + functor_prod (lact r) (lact r) n
apply path_prod; apply lm_dist_l.
R: Ring
M, N: LeftModule R

RightHeteroDistribute (fun r : R => functor_prod (lact r) (lact r)) plus plus
R: Ring
M, N: LeftModule R
r, m: R
n: ab_biprod M N

functor_prod (lact (r + m)) (lact (r + m)) n = functor_prod (lact r) (lact r) n + functor_prod (lact m) (lact m) n
apply path_prod; apply lm_dist_r.
R: Ring
M, N: LeftModule R

HeteroAssociative (fun r : R => functor_prod (lact r) (lact r)) (fun r : R => functor_prod (lact r) (lact r)) (fun r : R => functor_prod (lact r) (lact r)) mult
R: Ring
M, N: LeftModule R
r, s: R
m: ab_biprod M N

functor_prod (lact r) (lact r) (functor_prod (lact s) (lact s) m) = functor_prod (lact (r * s)) (lact (r * s)) m
apply path_prod; apply lm_assoc.
R: Ring
M, N: LeftModule R

LeftIdentity (fun r : R => functor_prod (lact r) (lact r)) 1
R: Ring
M, N: LeftModule R
r: ab_biprod M N

functor_prod (lact 1) (lact 1) r = r
apply path_prod; apply lm_unit. Defined. Definition rm_prod {R : Ring} : RightModule R -> RightModule R -> RightModule R := lm_prod (R:=rng_op R).
R: Ring
M, N: LeftModule R

lm_prod M N $-> M
R: Ring
M, N: LeftModule R

lm_prod M N $-> M
R: Ring
M, N: LeftModule R

GroupHomomorphism (lm_prod M N) M
R: Ring
M, N: LeftModule R
forall (r : R) (m : lm_prod M N), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N: LeftModule R

GroupHomomorphism (lm_prod M N) M
exact grp_prod_pr1.
R: Ring
M, N: LeftModule R

forall (r : R) (m : lm_prod M N), grp_prod_pr1 (r *L m) = r *L grp_prod_pr1 m
reflexivity. Defined. Definition rm_prod_fst {R : Ring} {M N : RightModule R} : rm_prod M N $-> M := lm_prod_fst (R:=rng_op R).
R: Ring
M, N: LeftModule R

lm_prod M N $-> N
R: Ring
M, N: LeftModule R

lm_prod M N $-> N
R: Ring
M, N: LeftModule R

GroupHomomorphism (lm_prod M N) N
R: Ring
M, N: LeftModule R
forall (r : R) (m : lm_prod M N), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N: LeftModule R

GroupHomomorphism (lm_prod M N) N
exact grp_prod_pr2.
R: Ring
M, N: LeftModule R

forall (r : R) (m : lm_prod M N), grp_prod_pr2 (r *L m) = r *L grp_prod_pr2 m
reflexivity. Defined. Definition rm_prod_snd {R : Ring} {M N : RightModule R} : rm_prod M N $-> N := lm_prod_snd (R:=rng_op R).
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N

L $-> lm_prod M N
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N

L $-> lm_prod M N
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N

GroupHomomorphism L (lm_prod M N)
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N
forall (r : R) (m : L), ?lm_homo_map (r *L m) = r *L ?lm_homo_map m
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N

GroupHomomorphism L (lm_prod M N)
exact (grp_prod_corec f g).
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N

forall (r : R) (m : L), grp_prod_corec f g (r *L m) = r *L grp_prod_corec f g m
R: Ring
M, N, L: LeftModule R
f: L $-> M
g: L $-> N
r: R
l: L

grp_prod_corec f g (r *L l) = r *L grp_prod_corec f g l
apply path_prod; apply lm_homo_lact. Defined. Definition rm_prod_corec {R : Ring} {M N : RightModule R} (R' : RightModule R) (f : R' $-> M) (g : R' $-> N) : R' $-> rm_prod M N := lm_prod_corec (R:=rng_op R) R' f g.
R: Ring

HasBinaryProducts (LeftModule R)
R: Ring

HasBinaryProducts (LeftModule R)
R: Ring
M, N: LeftModule R

BinaryProduct M N
R: Ring
M, N: LeftModule R

LeftModule R
R: Ring
M, N: LeftModule R
?cat_binprod' $-> M
R: Ring
M, N: LeftModule R
?cat_binprod' $-> N
R: Ring
M, N: LeftModule R
forall z : LeftModule R, (z $-> M) -> (z $-> N) -> z $-> ?cat_binprod'
R: Ring
M, N: LeftModule R
forall (z : LeftModule R) (f : z $-> M) (g : z $-> N), ?cat_pr1 $o ?cat_binprod_corec z f g $== f
R: Ring
M, N: LeftModule R
forall (z : LeftModule R) (f : z $-> M) (g : z $-> N), ?cat_pr2 $o ?cat_binprod_corec z f g $== g
R: Ring
M, N: LeftModule R
forall (z : LeftModule R) (f g : z $-> ?cat_binprod'), ?cat_pr1 $o f $== ?cat_pr1 $o g -> ?cat_pr2 $o f $== ?cat_pr2 $o g -> f $== g
R: Ring
M, N: LeftModule R

LeftModule R
exact (lm_prod M N).
R: Ring
M, N: LeftModule R

lm_prod M N $-> M
exact lm_prod_fst.
R: Ring
M, N: LeftModule R

lm_prod M N $-> N
exact lm_prod_snd.
R: Ring
M, N: LeftModule R

forall z : LeftModule R, (z $-> M) -> (z $-> N) -> z $-> lm_prod M N
exact lm_prod_corec.
R: Ring
M, N: LeftModule R

forall (z : LeftModule R) (f : z $-> M) (g : z $-> N), lm_prod_fst $o lm_prod_corec z f g $== f
cbn; reflexivity.
R: Ring
M, N: LeftModule R

forall (z : LeftModule R) (f : z $-> M) (g : z $-> N), lm_prod_snd $o lm_prod_corec z f g $== g
cbn; reflexivity.
R: Ring
M, N: LeftModule R

forall (z : LeftModule R) (f g : z $-> lm_prod M N), lm_prod_fst $o f $== lm_prod_fst $o g -> lm_prod_snd $o f $== lm_prod_snd $o g -> f $== g
R: Ring
M, N, L: LeftModule R
f, g: L $-> lm_prod M N
p: lm_prod_fst $o f $== lm_prod_fst $o g
q: lm_prod_snd $o f $== lm_prod_snd $o g
a: L

f a = g a
exact (path_prod' (p a) (q a)). Defined. Instance hasbinaryproducts_rightmodule {R : Ring} : HasBinaryProducts (RightModule R) := hasbinaryproducts_leftmodule (R:=rng_op R). (** ** Finite Sums *) (** Left scalar multiplication distributes over finite sums of left module elements. *)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n)%nat -> M
r: R

r *L ab_sum n f = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => r *L f k Hk)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n)%nat -> M
r: R

r *L ab_sum n f = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => r *L f k Hk)
R: Ring
M: LeftModule R
f: forall k : nat, (k < 0)%nat -> M
r: R

r *L ab_sum 0 f = ab_sum 0 (fun (k : nat) (Hk : (k < 0)%nat) => r *L f k Hk)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n.+1)%nat -> M
r: R
IHn: forall f : forall k : nat, (k < n)%nat -> M, r *L ab_sum n f = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => r *L f k Hk)
r *L ab_sum n.+1 f = ab_sum n.+1 (fun (k : nat) (Hk : (k < n.+1)%nat) => r *L f k Hk)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n.+1)%nat -> M
r: R
IHn: forall f : forall k : nat, (k < n)%nat -> M, r *L ab_sum n f = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => r *L f k Hk)

r *L ab_sum n.+1 f = ab_sum n.+1 (fun (k : nat) (Hk : (k < n.+1)%nat) => r *L f k Hk)
lhs napply lm_dist_l; simpl; f_ap. Defined. (** Right scalar multiplication distributes over finite sums of right module elements. *) Definition rm_sum_dist_r {R : Ring} (M : RightModule R) (n : nat) (f : forall k, (k < n)%nat -> M) (r : R) : ab_sum n f *R r = ab_sum n (fun k Hk => f k Hk *R r) := lm_sum_dist_l (R:=rng_op R) M n f r. (** Left module elements distribute over finite sums of scalars. *)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n)%nat -> R
x: M

ab_sum n f *L x = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => f k Hk *L x)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n)%nat -> R
x: M

ab_sum n f *L x = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => f k Hk *L x)
R: Ring
M: LeftModule R
f: forall k : nat, (k < 0)%nat -> R
x: M

ab_sum 0 f *L x = ab_sum 0 (fun (k : nat) (Hk : (k < 0)%nat) => f k Hk *L x)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n.+1)%nat -> R
x: M
IHn: forall f : forall k : nat, (k < n)%nat -> R, ab_sum n f *L x = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => f k Hk *L x)
ab_sum n.+1 f *L x = ab_sum n.+1 (fun (k : nat) (Hk : (k < n.+1)%nat) => f k Hk *L x)
R: Ring
M: LeftModule R
n: nat
f: forall k : nat, (k < n.+1)%nat -> R
x: M
IHn: forall f : forall k : nat, (k < n)%nat -> R, ab_sum n f *L x = ab_sum n (fun (k : nat) (Hk : (k < n)%nat) => f k Hk *L x)

ab_sum n.+1 f *L x = ab_sum n.+1 (fun (k : nat) (Hk : (k < n.+1)%nat) => f k Hk *L x)
lhs napply lm_dist_r; simpl; f_ap. Defined. (** Right module elements distribute over finite sums of scalar. *) Definition rm_sum_dist_l {R : Ring} (M : RightModule R) (n : nat) (f : forall k, (k < n)%nat -> R) (x : M) : x *R ab_sum n f = ab_sum n (fun k Hk => x *R f k Hk) := lm_sum_dist_r (R:=rng_op R) M n f x.