blob: fd219c2352c67a91d10c3b6b622561d3d0c77f7a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
Require Export Cring.
Require Export Integral_domain.
(* Real numbers *)
Require Import Reals.
Require Import RealField.
Lemma Rsth : Setoid_Theory R (@eq R).
constructor;red;intros;subst;trivial.
Qed.
Instance Rops: (@Ring_ops R 0%R 1%R Rplus Rmult Rminus Ropp (@eq R)).
Instance Rri : (Ring (Ro:=Rops)).
constructor;
try (try apply Rsth;
try (unfold respectful, Proper; unfold equality; unfold eq_notation in *;
intros; try rewrite H; try rewrite H0; reflexivity)).
exact Rplus_0_l. exact Rplus_comm. symmetry. apply Rplus_assoc.
exact Rmult_1_l. exact Rmult_1_r. symmetry. apply Rmult_assoc.
exact Rmult_plus_distr_r. intros; apply Rmult_plus_distr_l.
exact Rplus_opp_r.
Defined.
Instance Rcri: (Cring (Rr:=Rri)).
red. exact Rmult_comm. Defined.
Lemma R_one_zero: 1%R <> 0%R.
discrR.
Qed.
Instance Rdi : (Integral_domain (Rcr:=Rcri)).
constructor.
exact Rmult_integral. exact R_one_zero. Defined.
|