- generalize in match (zero_neutral R 0); intro;
- generalize in match (eq_f ? ? (λy.y*x) ? ? H); intro; clear H;
- rewrite > mult_plus_distr_right in H1;
- generalize in match (eq_f ? ? (λy.-(0*x)+y) ? ? H1); intro; clear H1;
- rewrite < plus_assoc in H;
- rewrite > opp_inverse in H;
- rewrite > zero_neutral in H;
- assumption.
-qed.
-
-lemma eq_mult_x_zero_zero: ∀R:ring.∀x:R.x*0=0.
-intros;
-generalize in match (zero_neutral R 0);
-intro;
-generalize in match (eq_f ? ? (\lambda y.x*y) ? ? H); intro; clear H;
-rewrite > mult_plus_distr_left in H1;
-generalize in match (eq_f ? ? (\lambda y. (-(x*0)) +y) ? ? H1);intro;
-clear H1;
-rewrite < plus_assoc in H;
-rewrite > opp_inverse in H;
-rewrite > zero_neutral in H;
-assumption.
-qed.
-
-record is_field (R:ring) (one:R) (inv:∀x:R.x ≠ 0 → R) : Prop
-≝
- { (* multiplicative abelian properties *)
- mult_comm_: symmetric ? (mult R);
- (* multiplicative monoid properties *)
- one_neutral_: left_neutral ? (mult R) one;
- (* multiplicative group properties *)
- inv_inverse_: ∀x.∀p: x ≠ 0. mult ? (inv x p) x = one;
- (* integral domain *)
- not_eq_zero_one_: (0 ≠ one)
- }.
-
-
-lemma opp_opp: \forall R:ring. \forall x:R. (-(-x))=x.
-intros;
-apply (cancellationlaw ? (-x) ? ?);
-rewrite > (opp_inverse R x);
-rewrite > plus_comm;
-rewrite > opp_inverse;
-reflexivity.
-qed.
-
-
-let rec sum (C:Type) (plus:C→C→C) (zero,one:C) (n:nat) on n ≝
- match n with
- [ O ⇒ zero
- | (S m) ⇒ plus one (sum C plus zero one m)
- ].
-
-record field : Type \def
- { f_ring:> ring;
- one: f_ring;
- inv: ∀x:f_ring. x ≠ 0 → f_ring;
- field_properties: is_field f_ring one inv
- }.
-
-notation "1" with precedence 89
-for @{ 'one }.
-
-interpretation "Field one" 'one =
- (cic:/matita/integration_algebras/one.con _).
-
-theorem mult_comm: ∀F:field.symmetric ? (mult F).
- intro;
- apply (mult_comm_ ? ? ? (field_properties F)).