Built with Alectryon, running Coq+SerAPI v8.18.0+0.18.3. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use instead of Ctrl.
[Loading ML file number_string_notation_plugin.cmxs (using legacy method) ... done]
Require Import Truncations.Core. Require Import Algebra.Groups.Group TruncType. Local Open Scope mc_scope. Local Open Scope mc_mult_scope. Generalizable Variables G H A B C N f g. (** * Subgroups *) (** A subgroup H of a group G is a predicate (i.e. an hProp-valued type family) on G which is closed under the group operations. The group underlying H is given by the total space { g : G & H g }, defined in [subgroup_group] below. *) Class IsSubgroup {G : Group} (H : G -> Type) := { issubgroup_predicate : forall x, IsHProp (H x) ; issubgroup_in_unit : H mon_unit ; issubgroup_in_op : forall x y, H x -> H y -> H (x * y) ; issubgroup_in_inv : forall x, H x -> H (- x) ; }. Global Existing Instance issubgroup_predicate. (** Smart constructor for subgroups. *)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

IsSubgroup H
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

IsSubgroup H
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

forall x y : G, H x -> H y -> H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
forall x : G, H x -> H (- x)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

forall x y : G, H x -> H y -> H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
x, y: G

H x -> H y -> H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
x, y: G
hx: H x
hy: H y

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
x, y: G
hx: H x
hy: H y
c':= c mon_unit y: H mon_unit -> H y -> H (mon_unit * - y)

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
x, y: G
hx: H x
hy: H y
c': H y -> H (mon_unit * - y)

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * - - y)
hx: H x
hy: H y
c': H y -> H (mon_unit * - y)

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * y)
hx: H x
hy: H y
c': H y -> H (mon_unit * - y)

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * y)
hx: H x
hy: H y
c': H y -> H (- y)

H (x * y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * y)
hx: H x
hy: H y
c': H y -> H (- y)

H x
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * y)
hx: H x
hy: H y
c': H y -> H (- y)
H (- y)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
x, y: G
c: H x -> H (- y) -> H (x * y)
hx: H x
hy: H y
c': H y -> H (- y)

H (- y)
exact (c' hy).
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

forall x : G, H x -> H (- x)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)
g: G

H g -> H (- g)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
g: G
c: H g -> H (mon_unit * - g)

H g -> H (- g)
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
g: G
c: H g -> H (- g)

H g -> H (- g)
assumption. Defined. (** Additional lemmas about being elements in a subgroup *) Section IsSubgroupElements. Context {G : Group} {H : G -> Type} `{IsSubgroup G H}.
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H y -> H (x * - y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H y -> H (x * - y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H (x * - y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H x
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y
H (- y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H (- y)
by apply issubgroup_in_inv. Defined.
G: Group
H: G -> Type
H0: IsSubgroup H
x: G

H (- x) -> H x
G: Group
H: G -> Type
H0: IsSubgroup H
x: G

H (- x) -> H x
G: Group
H: G -> Type
H0: IsSubgroup H
x: G

H (- x) -> H (- - x)
apply issubgroup_in_inv. Defined.
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H y -> H (- x * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H y -> H (- x * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H (- x * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H (- x * - - y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y

H (- x)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H x
q: H y
H (- y)
1,2: by apply issubgroup_in_inv. Defined.
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H y -> H x
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H y -> H x
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H (x * y)
q: H y

H x
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H (x * y)
q: H y

H (x * mon_unit)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H y -> H (x * mon_unit)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H y -> H (x * (y * - y))
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H y -> H (x * y * - y)
apply issubgroup_in_op_inv. Defined.
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H x -> H y
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H (x * y) -> H x -> H y
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H (x * y)
q: H x

H y
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G
p: H (x * y)
q: H x

H (mon_unit * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H (x * y) -> H (mon_unit * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H (x * y) -> H (- x * x * y)
G: Group
H: G -> Type
H0: IsSubgroup H
x, y: G

H x -> H (x * y) -> H (- x * (x * y))
apply issubgroup_in_inv_op. Defined. End IsSubgroupElements. Definition issig_issubgroup {G : Group} (H : G -> Type) : _ <~> IsSubgroup H := ltac:(issig). (** Given a predicate H on a group G, being a subgroup is a property. *)
F: Funext
G: Group
H: G -> Type

IsHProp (IsSubgroup H)
F: Funext
G: Group
H: G -> Type

IsHProp (IsSubgroup H)
exact (istrunc_equiv_istrunc _ (issig_issubgroup H)). Defined. (** The type (set) of subgroups of a group G. *) Record Subgroup (G : Group) := { subgroup_pred : G -> Type ; subgroup_issubgroup : IsSubgroup subgroup_pred ; }. Coercion subgroup_pred : Subgroup >-> Funclass. Global Existing Instance subgroup_issubgroup.
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

Subgroup G
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

Subgroup G
G: Group
H: G -> Type
H0: forall x : G, IsHProp (H x)
unit: H mon_unit
c: forall x y : G, H x -> H y -> H (x * - y)

IsSubgroup H
rapply Build_IsSubgroup'; assumption. Defined. Section SubgroupElements. Context {G : Group} (H : Subgroup G) (x y : G). Definition subgroup_in_unit : H mon_unit := issubgroup_in_unit. Definition subgroup_in_inv : H x -> H (- x) := issubgroup_in_inv x. Definition subgroup_in_inv' : H (- x) -> H x := issubgroup_in_inv' x. Definition subgroup_in_op : H x -> H y -> H (x * y) := issubgroup_in_op x y. Definition subgroup_in_op_inv : H x -> H y -> H (x * -y) := issubgroup_in_op_inv x y. Definition subgroup_in_inv_op : H x -> H y -> H (-x * y) := issubgroup_in_inv_op x y. Definition subgroup_in_op_l : H (x * y) -> H y -> H x := issubgroup_in_op_l x y. Definition subgroup_in_op_r : H (x * y) -> H x -> H y := issubgroup_in_op_r x y. End SubgroupElements.
G: Group
H: Subgroup G
x: G

IsEquiv (subgroup_in_inv H x)
G: Group
H: Subgroup G
x: G

IsEquiv (subgroup_in_inv H x)
G: Group
H: Subgroup G
x: G

H (- x) -> H x
apply subgroup_in_inv'. Defined. Definition equiv_subgroup_inverse {G : Group} (H : Subgroup G) (x : G) : H x <~> H (-x) := Build_Equiv _ _ (subgroup_in_inv H x) _. (** The group given by a subgroup *)
G: Group
H: Subgroup G

Group
G: Group
H: Subgroup G

Group
G: Group
H: Subgroup G

IsGroup {x : _ & H x}
(** Finally we need to prove our group laws. *)
G: Group
H: Subgroup G

IsHSet {x : _ & H x}
G: Group
H: Subgroup G
Associative sg_op
G: Group
H: Subgroup G
LeftIdentity sg_op mon_unit
G: Group
H: Subgroup G
RightIdentity sg_op mon_unit
G: Group
H: Subgroup G
LeftInverse sg_op negate mon_unit
G: Group
H: Subgroup G
RightInverse sg_op negate mon_unit
G: Group
H: Subgroup G

Associative sg_op
G: Group
H: Subgroup G
LeftIdentity sg_op mon_unit
G: Group
H: Subgroup G
RightIdentity sg_op mon_unit
G: Group
H: Subgroup G
LeftInverse sg_op negate mon_unit
G: Group
H: Subgroup G
RightInverse sg_op negate mon_unit
all: grp_auto. Defined. Coercion subgroup_group : Subgroup >-> Group.
G: Group
H: Subgroup G

H $-> G
G: Group
H: Subgroup G

H $-> G
G: Group
H: Subgroup G

H -> G
G: Group
H: Subgroup G
IsMonoidPreserving ?grp_homo_map
G: Group
H: Subgroup G

IsMonoidPreserving pr1
repeat split. Defined. Global Instance isembedding_subgroup_incl {G : Group} (H : Subgroup G) : IsEmbedding (subgroup_incl H) := fun _ => istrunc_equiv_istrunc _ (hfiber_fibration _ _). Definition issig_subgroup {G : Group} : _ <~> Subgroup G := ltac:(issig). (** Trivial subgroup *)
G: Group

Subgroup G
G: Group

Subgroup G
G: Group

mon_unit = mon_unit
G: Group
forall x y : G, x = mon_unit -> y = mon_unit -> x * - y = mon_unit
G: Group

forall x y : G, x = mon_unit -> y = mon_unit -> x * - y = mon_unit
G: Group
x, y: G
p: x = mon_unit
q: y = mon_unit

x * - y = mon_unit
G: Group
x, y: G
p: x = mon_unit
q: y = mon_unit

mon_unit * - mon_unit = mon_unit
G: Group
x, y: G
p: x = mon_unit
q: y = mon_unit

- mon_unit = mon_unit
apply negate_mon_unit. Defined. (** Every group is a (maximal) subgroup of itself *)
G: Group

Subgroup G
G: Group

Subgroup G
G: Group

IsSubgroup (fun _ : G => Unit)
split; auto; exact _. Defined. (** Paths between subgroups correspond to homotopies between the underlying predicates. *)
F: Funext
G: Group
H, K: Subgroup G

H == K <~> H = K
F: Funext
G: Group
H, K: Subgroup G

H == K <~> H = K
F: Funext
G: Group
H, K: Subgroup G

H == K <~> (H; subgroup_issubgroup G H) = (K; subgroup_issubgroup G K)
F: Funext
G: Group
H, K: Subgroup G

H == K <~> H = K
apply equiv_path_arrow. Defined.
U: Univalence
G: Group
H, K: Subgroup G

(forall g : G, H g <-> K g) <~> H = K
U: Univalence
G: Group
H, K: Subgroup G

(forall g : G, H g <-> K g) <~> H = K
U: Univalence
G: Group
H, K: Subgroup G

(forall g : G, H g <-> K g) <~> H == K
U: Univalence
G: Group
H, K: Subgroup G
g: G

(H g <-> K g) <~> H g = K g
exact equiv_path_iff_ishprop. Defined.
H: Univalence
G: Group

IsHSet (Subgroup G)
H: Univalence
G: Group

IsHSet (Subgroup G)
H: Univalence
G: Group

IsHSet {H : G -> Type & IsSubgroup H}
H: Univalence
G: Group

forall a : G -> Type, ?Goal a <~> IsSubgroup a
H: Univalence
G: Group
IsHSet {x : _ & ?Goal x}
H: Univalence
G: Group

forall a : G -> Type, ?Goal a <~> IsSubgroup a
intro P; apply issig_issubgroup.
H: Univalence
G: Group

IsHSet {P : G -> Type & {_ : forall x : G, IsHProp (P x) & {_ : P mon_unit & {_ : forall x y : G, P x -> P y -> P (x * y) & forall x : G, P x -> P (- x)}}}}
H: Univalence
G: Group

IsHSet {ap : {a : G -> Type & forall x : G, IsHProp (a x)} & {_ : ap.1 mon_unit & {_ : forall x y : G, ap.1 x -> ap.1 y -> ap.1 (x * y) & forall x : G, ap.1 x -> ap.1 (- x)}}}
H: Univalence
G: Group

IsHSet {a : G -> Type & forall x : G, IsHProp (a x)}
H: Univalence
G: Group
forall a : {a : G -> Type & forall x : G, IsHProp (a x)}, IsHSet {_ : a.1 mon_unit & {_ : forall x y : G, a.1 x -> a.1 y -> a.1 (x * y) & forall x : G, a.1 x -> a.1 (- x)}}
H: Univalence
G: Group

IsHSet {a : G -> Type & forall x : G, IsHProp (a x)}
H: Univalence
G: Group

IsHSet (G -> {x : Type & IsHProp x})
apply istrunc_forall. Defined. Section Cosets. (** Left and right cosets give equivalence relations. *) Context {G : Group} (H : Subgroup G). (** The relation of being in a left coset represented by an element. *) Definition in_cosetL : Relation G := fun x y => H (-x * y). (** The relation of being in a right coset represented by an element. *) Definition in_cosetR : Relation G := fun x y => H (x * -y). Hint Extern 4 => progress unfold in_cosetL : typeclass_instances. Hint Extern 4 => progress unfold in_cosetR : typeclass_instances. Global Arguments in_cosetL /. Global Arguments in_cosetR /. (** These are props *) Global Instance ishprop_in_cosetL : is_mere_relation G in_cosetL := _. Global Instance ishprop_in_cosetR : is_mere_relation G in_cosetR := _. (** In fact, they are both equivalence relations. *)
G: Group
H: Subgroup G

Reflexive in_cosetL
G: Group
H: Subgroup G

Reflexive in_cosetL
G: Group
H: Subgroup G
x: G

H (- x * x)
G: Group
H: Subgroup G
x: G

H mon_unit
apply issubgroup_in_unit. Defined.
G: Group
H: Subgroup G

Reflexive in_cosetR
G: Group
H: Subgroup G

Reflexive in_cosetR
G: Group
H: Subgroup G
x: G

H (x * - x)
G: Group
H: Subgroup G
x: G

H mon_unit
apply issubgroup_in_unit. Defined.
G: Group
H: Subgroup G

Symmetric in_cosetL
G: Group
H: Subgroup G

Symmetric in_cosetL
G: Group
H: Subgroup G
x, y: G
h: H (- x * y)

H (- y * x)
G: Group
H: Subgroup G
x, y: G
h: H (- x * y)

H (- y * - - x)
G: Group
H: Subgroup G
x, y: G
h: H (- x * y)

H (- (- x * y))
apply issubgroup_in_inv; assumption. Defined.
G: Group
H: Subgroup G

Symmetric in_cosetR
G: Group
H: Subgroup G

Symmetric in_cosetR
G: Group
H: Subgroup G
x, y: G
h: H (x * - y)

H (y * - x)
G: Group
H: Subgroup G
x, y: G
h: H (x * - y)

H (- - y * - x)
G: Group
H: Subgroup G
x, y: G
h: H (x * - y)

H (- (x * - y))
apply issubgroup_in_inv; assumption. Defined.
G: Group
H: Subgroup G

Transitive in_cosetL
G: Group
H: Subgroup G

Transitive in_cosetL
G: Group
H: Subgroup G
x, y, z: G
h: H (- x * y)
k: H (- y * z)

H (- x * z)
G: Group
H: Subgroup G
x, y, z: G
h: H (- x * y)
k: H (- y * z)

H (- x * mon_unit * z)
G: Group
H: Subgroup G
x, y, z: G
h: H (- x * y)
k: H (- y * z)

H (- x * (y * - y) * z)
G: Group
H: Subgroup G
x, y, z: G
h: H (- x * y)
k: H (- y * z)

H (- x * y * - y * z)
G: Group
H: Subgroup G
x, y, z: G
h: H (- x * y)
k: H (- y * z)

H (- x * y * (- y * z))
apply issubgroup_in_op; assumption. Defined.
G: Group
H: Subgroup G

Transitive in_cosetR
G: Group
H: Subgroup G

Transitive in_cosetR
G: Group
H: Subgroup G
x, y, z: G
h: H (x * - y)
k: H (y * - z)

H (x * - z)
G: Group
H: Subgroup G
x, y, z: G
h: H (x * - y)
k: H (y * - z)

H (x * mon_unit * - z)
G: Group
H: Subgroup G
x, y, z: G
h: H (x * - y)
k: H (y * - z)

H (x * (- y * y) * - z)
G: Group
H: Subgroup G
x, y, z: G
h: H (x * - y)
k: H (y * - z)

H (x * - y * y * - z)
G: Group
H: Subgroup G
x, y, z: G
h: H (x * - y)
k: H (y * - z)

H (x * - y * (y * - z))
apply issubgroup_in_op; assumption. Defined. End Cosets. (** Identities related to the left and right cosets. *)
G: Group
N: Subgroup G

forall x y : G, in_cosetL N (- x * y) mon_unit <~> in_cosetL N x y
G: Group
N: Subgroup G

forall x y : G, in_cosetL N (- x * y) mon_unit <~> in_cosetL N x y
G: Group
N: Subgroup G
x, y: G

N (- (- x * y) * mon_unit) <~> N (- x * y)
G: Group
N: Subgroup G
x, y: G

N (- (- x * y)) <~> N (- x * y)
G: Group
N: Subgroup G
x, y: G

N (- y * - - x) <~> N (- x * y)
G: Group
N: Subgroup G
x, y: G

N (- y * x) <~> N (- x * y)
apply equiv_iff_hprop; apply symmetric_in_cosetL. Defined.
G: Group
N: Subgroup G

forall x y : G, in_cosetR N (x * - y) mon_unit <~> in_cosetR N x y
G: Group
N: Subgroup G

forall x y : G, in_cosetR N (x * - y) mon_unit <~> in_cosetR N x y
G: Group
N: Subgroup G
x, y: G

N (x * - y * - mon_unit) <~> N (x * - y)
G: Group
N: Subgroup G
x, y: G

N (x * - y * mon_unit) <~> N (x * - y)
G: Group
N: Subgroup G
x, y: G

N (x * - y) <~> N (x * - y)
reflexivity. Defined. (** Symmetry is an equivalence. *)
G: Group
N: Subgroup G

forall x y : G, in_cosetL N x y <~> in_cosetL N y x
G: Group
N: Subgroup G

forall x y : G, in_cosetL N x y <~> in_cosetL N y x
G: Group
N: Subgroup G
x, y: G

in_cosetL N x y <~> in_cosetL N y x
G: Group
N: Subgroup G
x, y: G

in_cosetL N x y -> in_cosetL N y x
G: Group
N: Subgroup G
x, y: G
in_cosetL N y x -> in_cosetL N x y
all: by intro. Defined.
G: Group
N: Subgroup G

forall x y : G, in_cosetR N x y <~> in_cosetR N y x
G: Group
N: Subgroup G

forall x y : G, in_cosetR N x y <~> in_cosetR N y x
G: Group
N: Subgroup G
x, y: G

in_cosetR N x y <~> in_cosetR N y x
G: Group
N: Subgroup G
x, y: G

in_cosetR N x y -> in_cosetR N y x
G: Group
N: Subgroup G
x, y: G
in_cosetR N y x -> in_cosetR N x y
all: by intro. Defined. (** A subgroup is normal if being in a left coset is equivalent to being in a right coset represented by the same element. *) Class IsNormalSubgroup {G : Group} (N : Subgroup G) := isnormal : forall {x y}, in_cosetL N x y <~> in_cosetR N x y. Record NormalSubgroup (G : Group) := { normalsubgroup_subgroup : Subgroup G ; normalsubgroup_isnormal : IsNormalSubgroup normalsubgroup_subgroup ; }. Coercion normalsubgroup_subgroup : NormalSubgroup >-> Subgroup. Global Existing Instance normalsubgroup_isnormal. (* Inverses are then respected *)
G: Group
N: NormalSubgroup G

forall x y : G, in_cosetL N (- x) (- y) <~> in_cosetL N x y
G: Group
N: NormalSubgroup G

forall x y : G, in_cosetL N (- x) (- y) <~> in_cosetL N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetL N (- x) (- y) <~> in_cosetL N x y
G: Group
N: NormalSubgroup G
x, y: G

N (- - x * - y) <~> N (- x * y)
G: Group
N: NormalSubgroup G
x, y: G

N (x * - y) <~> N (- x * y)
symmetry; apply isnormal. Defined.
G: Group
N: NormalSubgroup G

forall x y : G, in_cosetR N (- x) (- y) <~> in_cosetR N x y
G: Group
N: NormalSubgroup G

forall x y : G, in_cosetR N (- x) (- y) <~> in_cosetR N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetR N (- x) (- y) <~> in_cosetR N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetR N (- x * - - y) mon_unit <~> in_cosetR N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetL N (- x * - - y) mon_unit <~> in_cosetR N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetL N x (- - y) <~> in_cosetR N x y
G: Group
N: NormalSubgroup G
x, y: G

in_cosetR N x (- - y) <~> in_cosetR N x y
by rewrite negate_involutive. Defined. (** This lets us prove that left and right coset relations are congruences. *)
G: Group
N: NormalSubgroup G
x, x', y, y': G

in_cosetL N x y -> in_cosetL N x' y' -> in_cosetL N (x * x') (y * y')
G: Group
N: NormalSubgroup G
x, x', y, y': G

in_cosetL N x y -> in_cosetL N x' y' -> in_cosetL N (x * x') (y * y')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- (x * x') * (y * y'))
(** rewrite goal before applying subgroup_op *)
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- x' * (- x * (y * y')))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- (- x * (y * y')) * x')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- (- x * y * y') * x')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- x * y * y' * - x')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- x * y * (y' * - x'))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (- x * y)
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')
N (y' * - x')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (- x * y)
q: N (- x' * y')

N (y' * - x')
by apply isnormal, symmetric_in_cosetL. Defined.
G: Group
N: NormalSubgroup G
x, x', y, y': G

in_cosetR N x y -> in_cosetR N x' y' -> in_cosetR N (x * x') (y * y')
G: Group
N: NormalSubgroup G
x, x', y, y': G

in_cosetR N x y -> in_cosetR N x' y' -> in_cosetR N (x * x') (y * y')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (x * x' * - (y * y'))
(** rewrite goal before applying subgroup_op *)
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (x * x' * - y' * - y)
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (y * - (x * x' * - y'))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (y * - (x * (x' * - y')))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (- y * (x * (x' * - y')))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (- y * x * (x' * - y'))
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (- y * x)
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')
N (x' * - y')
G: Group
N: NormalSubgroup G
x, x', y, y': G
p: N (x * - y)
q: N (x' * - y')

N (- y * x)
by apply isnormal, symmetric_in_cosetR. Defined. (** The property of being the trivial subgroup is useful. *) Definition IsTrivialSubgroup {G : Group} (H : Subgroup G) : Type := forall x, H x <-> trivial_subgroup x. Existing Class IsTrivialSubgroup. Global Instance istrivialsubgroup_trivial_subgroup {G : Group} : IsTrivialSubgroup (@trivial_subgroup G) := ltac:(hnf; reflexivity). (** Intersection of two subgroups *)
G: Group
H, K: Subgroup G

Subgroup G
G: Group
H, K: Subgroup G

Subgroup G
G: Group
H, K: Subgroup G

G -> Type
G: Group
H, K: Subgroup G
forall x : G, IsHProp (?H x)
G: Group
H, K: Subgroup G
?H mon_unit
G: Group
H, K: Subgroup G
forall x y : G, ?H x -> ?H y -> ?H (x * - y)
G: Group
H, K: Subgroup G

forall x : G, IsHProp ((fun g : G => (H g * K g)%type) x)
G: Group
H, K: Subgroup G
(fun g : G => (H g * K g)%type) mon_unit
G: Group
H, K: Subgroup G
forall x y : G, (fun g : G => (H g * K g)%type) x -> (fun g : G => (H g * K g)%type) y -> (fun g : G => (H g * K g)%type) (x * - y)
G: Group
H, K: Subgroup G

(fun g : G => (H g * K g)%type) mon_unit
G: Group
H, K: Subgroup G
forall x y : G, (fun g : G => (H g * K g)%type) x -> (fun g : G => (H g * K g)%type) y -> (fun g : G => (H g * K g)%type) (x * - y)
G: Group
H, K: Subgroup G

forall x y : G, (fun g : G => (H g * K g)%type) x -> (fun g : G => (H g * K g)%type) y -> (fun g : G => (H g * K g)%type) (x * - y)
G: Group
H, K: Subgroup G
x, y: G
fst: H x
snd: K x
fst0: H y
snd0: K y

(H (sg_op x (- y)) * K (sg_op x (- y)))%type
split; by apply subgroup_in_op_inv. Defined. (** *** The subgroup generated by a subset *) (** Underlying type family of a subgroup generated by subset *) Inductive subgroup_generated_type {G : Group} (X : G -> Type) : G -> Type := (** The subgroup should contain all elements of the original family. *) | sgt_in (g : G) : X g -> subgroup_generated_type X g (** It should contain the unit. *) | sgt_unit : subgroup_generated_type X mon_unit (** Finally, it should be closed under inverses and operation. *) | sgt_op (g h : G) : subgroup_generated_type X g -> subgroup_generated_type X h -> subgroup_generated_type X (g * - h) . Arguments sgt_in {G X g}. Arguments sgt_unit {G X}. Arguments sgt_op {G X g h}. (** Note that [subgroup_generated_type] will not automatically land in [HProp]. For example, if [X] already "contains" the unit of the group, then there are at least two different inhabitants of this family at the unit (given by [sgt_unit] and [sgt_in group_unit _]). Therefore, we propositionally truncate in [subgroup_generated] below. *) (** Subgroups are closed under inverses. *)
G: Group
X: G -> Type
g: G

subgroup_generated_type X g -> subgroup_generated_type X (- g)
G: Group
X: G -> Type
g: G

subgroup_generated_type X g -> subgroup_generated_type X (- g)
G: Group
X: G -> Type
g: G
p: subgroup_generated_type X g

subgroup_generated_type X (- g)
G: Group
X: G -> Type
g: G
p: subgroup_generated_type X g

subgroup_generated_type X (mon_unit * - g)
exact (sgt_op sgt_unit p). Defined.
G: Group
X: G -> Type
g, h: G

subgroup_generated_type X g -> subgroup_generated_type X h -> subgroup_generated_type X (g * h)
G: Group
X: G -> Type
g, h: G

subgroup_generated_type X g -> subgroup_generated_type X h -> subgroup_generated_type X (g * h)
G: Group
X: G -> Type
g, h: G
p: subgroup_generated_type X g
q: subgroup_generated_type X h

subgroup_generated_type X (g * h)
G: Group
X: G -> Type
g, h: G
p: subgroup_generated_type X g
q: subgroup_generated_type X h

subgroup_generated_type X (g * - - h)
exact (sgt_op p (sgt_inv q)). Defined. (** The subgroup generated by a subset *)
G: Group
X: G -> Type

Subgroup G
G: Group
X: G -> Type

Subgroup G
G: Group
X: G -> Type

forall x y : G, merely (subgroup_generated_type X x) -> merely (subgroup_generated_type X y) -> merely (subgroup_generated_type X (x * - y))
G: Group
X: G -> Type
x, y: G
q: subgroup_generated_type X y
p: subgroup_generated_type X x

merely (subgroup_generated_type X (x * - y))
exact (tr (sgt_op p q)). Defined. (** The inclusion of generators into the generated subgroup. *) Definition subgroup_generated_gen_incl {G : Group} {X : G -> Type} (g : G) (H : X g) : subgroup_generated X := (g; tr (sgt_in H)). (** If [f : G $-> H] is a group homomorphism and [X] and [Y] are subsets of [G] and [H] such that [f] maps [X] into [Y], then [f] sends the subgroup generated by [X] into the subgroup generated by [Y]. *)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)

forall g : G, subgroup_generated X g -> subgroup_generated Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)

forall g : G, subgroup_generated X g -> subgroup_generated Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g: G

subgroup_generated X g -> subgroup_generated Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g: G

subgroup_generated_type X g -> subgroup_generated_type Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g: G
p: subgroup_generated_type X g

subgroup_generated_type Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g: G
i: X g

subgroup_generated_type Y (f g)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
subgroup_generated_type Y (f mon_unit)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g, h: G
p1: subgroup_generated_type X g
p2: subgroup_generated_type X h
IHp1: subgroup_generated_type Y (f g)
IHp2: subgroup_generated_type Y (f h)
subgroup_generated_type Y (f (g * - h))
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g: G
i: X g

subgroup_generated_type Y (f g)
apply sgt_in, preserves, i.
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)

subgroup_generated_type Y (f mon_unit)
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)

subgroup_generated_type Y mon_unit
apply sgt_unit.
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g, h: G
p1: subgroup_generated_type X g
p2: subgroup_generated_type X h
IHp1: subgroup_generated_type Y (f g)
IHp2: subgroup_generated_type Y (f h)

subgroup_generated_type Y (f (g * - h))
G, H: Group
X: G -> Type
Y: H -> Type
f: G $-> H
preserves: forall g : G, X g -> Y (f g)
g, h: G
p1: subgroup_generated_type X g
p2: subgroup_generated_type X h
IHp1: subgroup_generated_type Y (f g)
IHp2: subgroup_generated_type Y (f h)

subgroup_generated_type Y (f g * - f h)
by apply sgt_op. Defined. (** The product of two subgroups. *) Definition subgroup_product {G : Group} (H K : Subgroup G) : Subgroup G := subgroup_generated (fun x => ((H x) + (K x))%type). (** The induction principle for the product. *)
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)

forall (x : G) (p : subgroup_product H K x), P x p
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)

forall (x : G) (p : subgroup_product H K x), P x p
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
p: subgroup_product H K x

P x p
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
p: subgroup_generated_type (fun x : G => (H x + K x)%type) x

P x (tr p)
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: (H x + K x)%type

P x (tr (sgt_in s))
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
P mon_unit (tr sgt_unit)
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x, y: G
h: subgroup_generated_type (fun x : G => (H x + K x)%type) x
k: subgroup_generated_type (fun x : G => (H x + K x)%type) y
IHh: P x (tr h)
IHk: P y (tr k)
P (x * - y) (tr (sgt_op h k))
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: (H x + K x)%type

P x (tr (sgt_in s))
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: H x

P x (tr (sgt_in (inl s)))
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: K x
P x (tr (sgt_in (inr s)))
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: H x

P x (tr (sgt_in (inl s)))
apply P_H_in.
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x: G
s: K x

P x (tr (sgt_in (inr s)))
apply P_K_in.
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)

P mon_unit (tr sgt_unit)
exact P_unit.
G: Group
H, K: Subgroup G
P: forall x : G, subgroup_product H K x -> Type
P_H_in: forall (x : G) (y : H x), P x (tr (sgt_in (inl y)))
P_K_in: forall (x : G) (y : K x), P x (tr (sgt_in (inr y)))
P_unit: P mon_unit (tr sgt_unit)
P_op: forall (x y : G) (h : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) x) (k : subgroup_generated_type (fun x0 : G => (H x0 + K x0)%type) y), P x (tr h) -> P y (tr k) -> P (x * - y) (tr (sgt_op h k))
H0: forall (x : G) (y : subgroup_product H K x), IsHProp (P x y)
x, y: G
h: subgroup_generated_type (fun x : G => (H x + K x)%type) x
k: subgroup_generated_type (fun x : G => (H x + K x)%type) y
IHh: P x (tr h)
IHk: P y (tr k)

P (x * - y) (tr (sgt_op h k))
by apply P_op. Defined. (* **** Paths between generated subgroups *) (* This gets used twice in [path_subgroup_generated], so we factor it out here. *)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)

forall g : G, Trunc (-1) (subgroup_generated_type X g) -> Trunc (-1) (subgroup_generated_type Y g)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)

forall g : G, Trunc (-1) (subgroup_generated_type X g) -> Trunc (-1) (subgroup_generated_type Y g)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g: G
ing: subgroup_generated_type X g

Trunc (-1) (subgroup_generated_type Y g)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g: G
x: X g

Trunc (-1) (subgroup_generated_type Y g)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
Trunc (-1) (subgroup_generated_type Y mon_unit)
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g, h: G
Xg: subgroup_generated_type X g
Xh: subgroup_generated_type X h
IHYg: Trunc (-1) (subgroup_generated_type Y g)
IHYh: Trunc (-1) (subgroup_generated_type Y h)
Trunc (-1) (subgroup_generated_type Y (g * - h))
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g: G
x: X g

Trunc (-1) (subgroup_generated_type Y g)
exact (Trunc_functor (-1) sgt_in (K g (tr x))).
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)

Trunc (-1) (subgroup_generated_type Y mon_unit)
exact (tr sgt_unit).
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g, h: G
Xg: subgroup_generated_type X g
Xh: subgroup_generated_type X h
IHYg: Trunc (-1) (subgroup_generated_type Y g)
IHYh: Trunc (-1) (subgroup_generated_type Y h)

Trunc (-1) (subgroup_generated_type Y (g * - h))
G: Group
X, Y: G -> Type
K: forall g : G, merely (X g) -> merely (Y g)
g, h: G
Xg: subgroup_generated_type X g
Xh: subgroup_generated_type X h
IHYh: subgroup_generated_type Y h
IHYg: subgroup_generated_type Y g

Trunc (-1) (subgroup_generated_type Y (g * - h))
by apply tr, sgt_op. Defined. (* If the predicates selecting the generators are merely equivalent, then the generated subgroups are equal. (One could probably prove that the generated subgroup are isomorphic without using univalence.) *)
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)

subgroup_generated X = subgroup_generated Y
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)

subgroup_generated X = subgroup_generated Y
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)

forall g : G, subgroup_generated X g <-> subgroup_generated Y g
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)
g: G

subgroup_generated X g -> subgroup_generated Y g
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)
g: G
subgroup_generated Y g -> subgroup_generated X g
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)
g: G

subgroup_generated X g -> subgroup_generated Y g
apply path_subgroup_generated_helper, (fun x => fst (K x)).
H: Univalence
G: Group
X, Y: G -> Type
K: forall g : G, Trunc (-1) (X g) <-> Trunc (-1) (Y g)
g: G

subgroup_generated Y g -> subgroup_generated X g
apply path_subgroup_generated_helper, (fun x => snd (K x)). Defined. (* Equal subgroups have isomorphic underlying groups. *) Definition equiv_subgroup_group {G : Group} (H1 H2 : Subgroup G) : H1 = H2 -> GroupIsomorphism H1 H2 := ltac:(intros []; exact grp_iso_id).