(* This program is free software; you can redistribute it and/or      *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1   *)
(* of the License, or (at your option) any later version.             *)
(*                                                                    *)
(* This program is distributed in the hope that it will be useful,    *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of     *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *)
(* GNU General Public License for more details.                       *)
(*                                                                    *)
(* You should have received a copy of the GNU Lesser General Public   *)
(* License along with this program; if not, write to the Free         *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA                                                     *)
Set Automatic Coercions Import.
Set Implicit Arguments.
Unset Strict Implicit.
Require Export Ring_facts.
Require Export Generated_module.
Section ideals.
Variable R : RING.
Definition is_ideal (I : subgroup R) :=
forall x : R, in_part x I -> forall a : R, in_part (ring_mult a x) I.
Record ideal : Type :=
{ideal_subgroup :> subgroup R; ideal_prf : is_ideal ideal_subgroup}.

Lemma ideal_prop :
forall (I : ideal) (x : I) (a : R), in_part (ring_mult a (I x)) I.