(* 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 Implicit Arguments.
Unset Strict Implicit.
Require Export Module_kernel.
Require Export Free_module.
Section Generated_module_def.
Variable R : RING.
Variable Mod : MODULE R.
Variable A : part_set Mod.

Definition generated_module : submodule Mod := coKer (FMd_lift (inj_part A)).
End Generated_module_def.

Lemma generated_module_minimal :
 forall (R : RING) (Mod : MODULE R) (A : part_set Mod) (H : submodule Mod),
 included A H -> included (generated_module A) H.
(* Goal: forall (R : Ob RING) (Mod : Ob (MODULE R)) (A : Carrier (part_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))), @included (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod (@generated_module R Mod A))))) *)
unfold included in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A x H'))) *)
simpl in |- *.
(* Goal: forall (R : ring) (Mod : module R) (A : Predicate (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (H : @submodule R Mod) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x A), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros R Mod A H H' x H'0; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
elim H'0; intros x0; clear H'0.
(* Goal: forall _ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x0)), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
generalize x; clear x.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
elim x0.
(* Goal: forall (c : Carrier (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f f0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros c; try assumption.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f f0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
elim c.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A x H'))) *)
simpl in |- *.
intros y subtype_prf x H'0; elim H'0; intros H'1 H'2; try exact H'2;
 clear H'0.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f f0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
apply in_part_comp_l with y; auto with algebra.
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (f0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f0))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Law R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f f0)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros f H'0 f0 H'1 x H'2; elim H'2; intros H'3 H'4; try exact H'4; clear H'2.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (Unit R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
simpl in H'4.
apply
 in_part_comp_l
  with
    (sgroup_law Mod (FMd_lift_fun (inj_part A) f)
(* Goal: True *)
       (FMd_lift_fun (inj_part A) f0)); auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A x H'))) *)
simpl in |- *.
(* Goal: forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@monoid_unit (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (monoid_on_def (group_monoid (abelian_group_group (@module_carrier R Mod))))))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros x H'0; elim H'0; intros H'1 H'2; try exact H'2; clear H'0.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
apply in_part_comp_l with (monoid_unit Mod); auto with algebra.
(* Goal: forall (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Inv R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros f H'0 x H'1; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
elim H'1; intros H'2 H'3; simpl in H'3; clear H'1.
apply in_part_comp_l with (group_inverse Mod (FMd_lift_fun (inj_part A) f));
(* Goal: True *)
 auto with algebra.
(* Goal: forall (c : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (ring_group R)))))) (f : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (_ : forall (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) f))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Op R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) c f)))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
intros c f H'0 x H'1; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
simpl in H'1.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod H)))) *)
elim H'1; intros H'2 H'3; try exact H'3; clear H'1.
apply in_part_comp_l with (module_mult c (FMd_lift_fun (inj_part A) f));
(* Goal: True *)
 auto with algebra.
Qed.

Lemma generated_module_prop_included :
 forall (R : RING) (Mod : MODULE R) (A : part_set Mod),
 included A (generated_module A).
(* Goal: forall (R : Ob RING) (Mod : Ob (MODULE R)) (A : Carrier (part_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))), @included (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod (@generated_module R Mod A))))) *)
unfold included in |- *.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A x H'))) *)
simpl in |- *.
(* Goal: forall (R : ring) (Mod : module R) (A : Predicate (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (x : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x A), @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x0 : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x0))) *)
intros R Mod A x H'; try assumption.
exists (Var R (V:=A) (Build_subtype (E:=Mod) (P:=A) (subtype_elt:=x) H'));
 split; [ idtac | try assumption ].
(* Goal: True *)
auto with algebra.
(* Goal: @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) x (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) (@Var R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) (@Build_subtype (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A x H'))) *)
simpl in |- *.
(* Goal: True *)
auto with algebra.
Qed.

Lemma generated_module_prop :
 forall (R : RING) (Mod : MODULE R) (A : part_set Mod) (y : Mod),
 in_part y (generated_module A) ->
 exists x : FMd R A, Equal y (FMd_lift (inj_part A) x).
(* Goal: True *)
simpl in |- *; auto with algebra.
(* Goal: forall (R : Ob RING) (Mod : Ob (MODULE R)) (A : Carrier (part_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))))))) (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))) (group_monoid (abelian_group_group (@module_carrier R Mod))) (@module_monoid_hom R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) Mod (@FMd_lift R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))))) x))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod (@generated_module R Mod A))))) *)
intros R Mod A y H'; try assumption.
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x)) *)
elim H'; intros x E; elim E; intros H'0 H'1; try exact H'1; clear E H'.
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x)) *)
exists x; try assumption.
Qed.

Lemma generated_module_prop_rev :
 forall (R : RING) (Mod : MODULE R) (A : part_set Mod) (y : Mod),
 (exists x : FMd R A, Equal y (FMd_lift (inj_part A) x)) ->
 in_part y (generated_module A).
(* Goal: forall (R : Ob RING) (Mod : Ob (MODULE R)) (A : Carrier (part_set (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))))) (y : Carrier (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))))) (_ : @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => @Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@Ap (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))))) (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@sgroup_map (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))))))) (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@monoid_sgroup_hom (group_monoid (abelian_group_group (@module_carrier R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)))))) (group_monoid (abelian_group_group (@module_carrier R Mod))) (@module_monoid_hom R (FreeModule R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) Mod (@FMd_lift R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))))) x))), @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod (@generated_module R Mod A))))) *)
intros R Mod A y H'; try assumption.
(* Goal: @in_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@subsgroup_part (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod)))) (@submonoid_subsgroup (group_monoid (abelian_group_group (@module_carrier R Mod))) (@subgroup_submonoid (abelian_group_group (@module_carrier R Mod)) (@submodule_subgroup R Mod (@generated_module R Mod A))))) *)
elim H'; intros x E; try exact E; clear H'.
(* Goal: True *)
simpl in |- *; auto with algebra.
(* Goal: @ex (FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A))) (fun x : FMd R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) => and True (@Equal (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) y (@FMd_lift_fun R (@set_of_subtype_image (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) (@part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A)) Mod (@inj_part (sgroup_set (monoid_sgroup (group_monoid (abelian_group_group (@module_carrier R Mod))))) A) x))) *)
exists x; split; [ idtac | try assumption ].
(* Goal: True *)
auto with algebra.
Qed.
Hint Resolve generated_module_minimal generated_module_prop_included
  generated_module_prop_rev: algebra.
