-notation "0" with precedence 89
-for @{ 'zero }.
-
-interpretation "Ring zero" 'zero =
- (cic:/matita/integration_algebras/zero.con _).
-
-interpretation "Ring plus" 'plus a b =
- (cic:/matita/integration_algebras/plus.con _ a b).
-
-interpretation "Ring opp" 'uminus a =
- (cic:/matita/integration_algebras/opp.con _ a).
-
-theorem plus_assoc: ∀G:abelian_group. associative ? (plus G).
- intro;
- apply (plus_assoc_ ? ? ? ? (ag_abelian_group_properties G)).
-qed.
-
-theorem plus_comm: ∀G:abelian_group. symmetric ? (plus G).
- intro;
- apply (plus_comm_ ? ? ? ? (ag_abelian_group_properties G)).
-qed.
-
-theorem zero_neutral: ∀G:abelian_group. left_neutral ? (plus G) 0.
- intro;
- apply (zero_neutral_ ? ? ? ? (ag_abelian_group_properties G)).
-qed.
-
-theorem opp_inverse: ∀G:abelian_group. left_inverse ? (plus G) 0 (opp G).
- intro;
- apply (opp_inverse_ ? ? ? ? (ag_abelian_group_properties G)).
-qed.
-
-lemma cancellationlaw: ∀G:abelian_group.∀x,y,z:G. x+y=x+z → y=z.
-intros;
-generalize in match (eq_f ? ? (λa.-x +a) ? ? H);
-intros; clear H;
-rewrite < plus_assoc in H1;
-rewrite < plus_assoc in H1;
-rewrite > opp_inverse in H1;
-rewrite > zero_neutral in H1;
-rewrite > zero_neutral in H1;
-assumption.
-qed.
-
-(****************************** rings *********************************)
-
-record is_ring (G:abelian_group) (mult:G→G→G) : Prop
-≝
- { (* multiplicative semigroup properties *)
- mult_assoc_: associative ? mult;
- (* ring properties *)
- mult_plus_distr_left_: distributive_left ? mult (plus G);
- mult_plus_distr_right_: distributive_right ? mult (plus G)
- }.
-
-record ring : Type \def
- { r_abelian_group:> abelian_group;
- mult: r_abelian_group → r_abelian_group → r_abelian_group;
- r_ring_properties: is_ring r_abelian_group mult